|
| String Functions : | Function Index |
Function
Description:
Use this function to check whether
the specified String ("String_Value")
ends with the specified end string value.
How
to Define:
endsWith("String_Value","End_String_Value")
Example:
endsWith("AdventNet","Net")
In the above case, the
string "AdventNet" will be verified whether it ends with "Net".
Return Values:
0 for Success
1 for Failure
Function
Description:
Use this function to get the index
within this string ("String_Value") of the first occurrence of the
specified pattern string.
How
to Define:
indexOf("String_Value","Pattern_String")
Example:
Return Values:
Integer - the start position of the
given Pattern_String in the given string.
Function
Description:
Use this function to get the length of
the given string.
How
to Define:
length("String_Name")
Example:
Return Values:
Integer - the length of the given
string.
Function
Description:
Use this function to replace each
substring of this string that matches the given search pattern with the
given replace string.
How
to Define:
replaceAll("String_Value","Search_Pattern","Replace_String")
Example:
Return Values:
String - the replaced string.
Function
Description:
Use this function to replace the
first substring of this string that
matches the given search pattern with the
given replace string.
How
to Define:
replaceFirst("String_Value","Search_Pattern","Replace_String")
Example:
Return Values:
String - the replaced string
Function
Description:
Use this function to split the
given string with the given separator.
How
to Define:
split("String_Value","Separator")
Example:
split("Advent-Net","-")
In the above case, the given string will be
splited with "-" separator and an array will be returned after spliting
the value. For this example, the resultant will be {"Advent","Net"}.
Return Values:
String Array - containing the
splited string in the array.
Function
Description:
Use this function to verify whether
the string starts with the specified start
string value.
How
to Define:
startsWith("String_Value","Start_String_Value")
Example:
startsWith("AdventNet","Advent")
In the above case, the given string
"AdventNet" will be verified whether it starts with "Advent". For this
example it will return "0".
Return Values:
0 for Success
1 for Failure
Function
Description:
Use this function to returns a new
string that is a substring of this string.
How
to Define:
subString("String_Value","Start_Index","End_Index")
Example:
Return Values:
String - the substring from the
original string.
Function
Description:
Use this function to convert the
specified string to lowercase.
How
to Define:
toLowerCase("String_Value")
Example:
Return Values:
String - all the letters in the
lowercase of the given string.
Function
Description:
Use this function to convert the
specified string to uppercase.
How
to Define:
toUpperCase("String_Value")
Example:
Return Values:
String - all the letters in the
uppercase of the given string.
|