str2str
The str2str function strips enclosing ' ' characters and returns the stripped string. If no enclosing ' ' characters are found, the passed string is returned, this function would be employed to strip enclosing ' ' characters that may be present.
sNewString = str2str( sString ) |
sString is
the string to test.
sNewString
is the result of stripping optionally enclosing ' ' characters.
sNewString = nil if not a string.
The scripts below returns a string enclosed by ' ' to its enclosed string:
|
-- string with ' ' |
|
- prints new = Johnny |
|
|
|
-- string without ' ' |
|
- prints new = Johnny |
|
|
|
-- not a string |
|
-- prints new = (nil) |
Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.