Gets a string with the specified characters. If Ignore Case is TRUE then upper-case and lower-case letters are considered to be equal.
Parameters
String to Parse |
The original string that gets stripped of all characters except those specified. |
Characters to Keep |
The characters that are not stripped from the original string. |
Ignore Case |
Indicates whether the case of the letters is taken into consideration. |
Format
String_Only_Characters (String to Parse, Characters to Keep, Ignore Case)
Return Value
Returns a string where all characters in String to Parse that are not in Characters to Keep have been deleted.
Example
Script(String_Only_Characters_Test)
String(strEntered)
String(strResult)
String(strCharactersToKeep)
Activate(From_Menu)
strEntered = Ask_String("Enter some text", "String_Only_Characters_Test", 1, 99, "abcdefghijk")
strCharactersToKeep = Ask_String("Enter the characters to keep", "String_Only_Characters_Test", 1, 99, "abc")
strResult = String_Only_Characters(strEntered,
strCharactersToKeep, TRUE)
Ask_OK(strResult, "String_Only_Characters_Test")
Return
See Also
String_Set, String_Combine, String_Left, String_Right, String_Middle, String_Upper, String_Lower, String_Replace, String_Strip_Characters, String_Trim_Spaces_Start, String_Trim_Spaces_End, Number_To_String_Binary, Number_To_String_Octal, Number_To_String_Decimal, Number_To_String_Hexadecimal_Lowercase, Number_To_String_Hexadecimal_Uppercase, Ask_String, Ask_String_Password, Ask_String_Uppercase, Ask_String_Lowercase, String_Equal
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other