More actions
jrfconvert import |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{HelpFiles}} | |||
| |||
====subString==== | ==== subString ==== | ||
Retrieves a substring from a source string. The substring starts at a specified character position or at the beginning of the string and has a specified length. | Retrieves a substring from a source string. The substring starts at a specified character position or at the beginning of the string and has a specified length. | ||
'''Syntax''' | '''Syntax''' | ||
subString(''source'', ''start'') | subString(''source'', ''start'') | ||
or | or | ||
subString(''source'', ''start'', ''length'') | subString(''source'', ''start'', ''length'') | ||
'''Arguments''' | '''Arguments''' | ||
''string_exp: ''Is a string expression. | ''string_exp: ''Is a string expression. | ||
''start: ''Is a number expression. This is the start character position. | ''start: ''Is a number expression. This is the start character position. | ||
''length: ''Is a number expression. This is the length of the substring. | ''length: ''Is a number expression. This is the length of the substring. | ||
'''Return type''' | '''Return type''' | ||
string | string | ||
'''Examples''' | '''Examples''' | ||
print(subString("Hello", 4)); | ''print(subString("Hello", 4));'' | ||
//o | ''//Result: o'' | ||
print(subString("Hello", 0, 4)); | ''print(subString("Hello", 0, 4));'' | ||
//Hell | ''//Result: Hell '' | ||
'''Availability''' | '''Availability''' | ||
Version 5.1 | Version 5.1 __NOTOC__ <!-- imported from file: 3738.htm--> | ||
__NOTOC__ | |||
<!-- imported from file: 3738.htm--> | [[Category:String_Functions]] |
Latest revision as of 03:42, 23 December 2011
subString
Retrieves a substring from a source string. The substring starts at a specified character position or at the beginning of the string and has a specified length.
Syntax
subString(source, start)
or
subString(source, start, length)
Arguments
string_exp: Is a string expression.
start: Is a number expression. This is the start character position.
length: Is a number expression. This is the length of the substring.
Return type
string
Examples
print(subString("Hello", 4));
//Result: o
print(subString("Hello", 0, 4));
//Result: Hell
Availability
Version 5.1