string StringSubstr(string text, int start, int length=0)
Extracts a substring from text string starting from the given position.
テキスト文字列の指定した位置から、部分文字列を抽出します。
The function returns a copy of the extracted substring if possible, otherwise, it returns an empty string.
この関数は、可能ならば、抽出された部分文字列のコピーを返します。それ以外の場合は、空の文字列を返します。
Parameters:
パラメータ:
| text |
- |
String from which the substring will be extracted. 部分文字列を抽出する文字列。 |
| start |
- |
部分文字列の開始インデックス。0から StringLen(text)-1 を指定できます。 |
| length |
- |
Length of the substring extracted.
If the parameter value exceeds or equals to 0 or the parameter is not specified,
the substring will be extracted starting from the given position and up to the end of the string.
抽出する部分文字列の長さ。パラメータ値を超える、または、0 に等しいか、パラメータが指定されていない場合は、部分文字列は、指定した位置から始まり、文字列の末尾まで抽出されます。 |
|
Sample:
サンプル:
string text="The quick brown dog jumps over the lazy fox";
string substr=StringSubstr(text, 4, 5);
// subtracted string is the "quick" word
|