Google

Go to the first, previous, next, last section, table of contents.


str_len, str_chr, sub_str

str_len(str)
:: ʸ»úÎó¤ÎŤµ¤òÊÖ¤¹.
str_chr(str,start,c)
:: ʸ»ú¤¬ºÇ½é¤Ë¸½¤ì¤ë°ÌÃÖ¤òÊÖ¤¹.
sub_str(str,start,end)
:: Éôʬʸ»úÎó¤òÊÖ¤¹.
return
str_len(), str_chr():À°¿ô; sub_str():ʸ»úÎó
str,c
ʸ»úÎó
start,end
ÈóÉéÀ°¿ô
  • str_len() ¤Ïʸ»úÎó¤ÎŤµ¤òÊÖ¤¹.
  • str_chr() ¤Ï str ¤Î start ÈÖÌܤÎʸ»ú¤«¤é¥¹¥­¥ã¥ó¤·¤Æ ºÇ½é¤Ë c ¤ÎºÇ½é¤Îʸ»ú¤¬¸½¤ì¤¿°ÌÃÖ¤òÊÖ¤¹. ʸ»úÎó¤ÎÀèÆ¬¤Ï 0 ÈÖÌܤȤ¹¤ë. »ØÄꤵ¤ì¤¿Ê¸»ú¤¬¸½¤ì¤Ê¤¤¾ì¹ç¤Ë¤Ï -1 ¤òÊÖ¤¹.
  • sub_str() ¤Ï, str ¤Î start ÈÖÌܤ«¤é end ÈÖÌÜ ¤Þ¤Ç¤ÎÉôʬʸ»úÎó¤òÀ¸À®¤·ÊÖ¤¹.
[185] Line="123 456 (x+y)^3";
123 456 (x+y)^3
[186] Sp1 = str_chr(Line,0," ");
3
[187] D0 = eval_str(sub_str(Line,0,Sp1-1));
123
[188] Sp2 = str_chr(Line,Sp1+1," ");
7
[189] D1 = eval_str(sub_str(Line,Sp1+1,Sp2-1));
456
[190] C = eval_str(sub_str(Line,Sp2+1,str_len(Line)-1));
x^3+3*y*x^2+3*y^2*x+y^3


Go to the first, previous, next, last section, table of contents.