The string conversion activity can be used to convert a string to another variable type or to upper/lower case the string.
Activity properties
Possible variable types to convert to:
Is true except when value is of the string is 'False'
Example:
String = "anything"
begin var ConvertedString: Boolean; ConvertedString := StringToConvert.ToBoolean; end; |
Result = True
CharArray (TArray<Char>)
Example:
String = "hello world"
begin var ConvertedString: TArray<Char>; ConvertedString := StringToConvert.ToCharArray; end; |
Result = ['H','e','l','l','o',' ','w','o','r','l','d']
Decimal (Double)
Example:
String = "3.5" (or "3,5" depending on settings)
begin var ConvertedString: Double; ConvertedString := StringToConvert.ToDouble; end; |
Result = 3.5
Example:
String = "3.5" (or "3,5" depending on settings)
begin var ConvertedString: Extended; ConvertedString := StringToConvert.ToExtended; end; |
Result = 3.5
Bigint (Int64)
Example:
String = "34214"
begin var ConvertedString: Int64; ConvertedString := StringToConvert.ToInt64; end; |
Result = 34214
Example:
String = "34214"
begin var ConvertedString: Integer; ConvertedString := StringToConvert.ToInteger; end; |
Result = 34214
Example:
String = "34214"
begin var ConvertedString: Single; ConvertedString := StringToConvert.ToSingle; end; |
Result = 34214
Other conversions:
Example:
String = "Hello world"
begin var ConvertedString: Single; ConvertedString := StringToConvert.ToSingle; end; |
Result = hello world
Example:
String = "Hello world"
begin var ConvertedString: Single; ConvertedString := StringToConvert.ToSingle; end; |
Result = HELLO WORLD