StringUtils¶
-
MLModule
¶ genre Fields
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLMiscModules
definition MLMiscModules.def see also StringSplit
keywords concat
,trim
,format
,search
,find
,replace
,character
,concatenate
,lower
,upper
,case
,reverse
,string
,substring
,ascii
,prefix
,postfix
,parse
Purpose¶
The module StringUtils
offers a collection of general purpose operations on strings.
All operations work on the modules fields. No scripting is used inside this module.
Details¶
Depending on the chosen Operation
, the GUI shows different input and option fields.
However, the Result
alway remains at the same place.
Parameter Fields¶
Visible Fields¶
Operation¶
-
name:
operationType
, type:
Enum
, default:
Concatenate
¶ Defines the string operation.
Values:
Title | Name | Description |
---|---|---|
Concatenate | Concatenate | Up to six input strings may be concatenated. Each one may be toggled on or off through a checkbox (by default, the first two strings are active, while the other four are inactive). At the end of each line, an integer-field refers to the length of the input-strings. Only active strings will be considered for concatenation. The checkboxes Prefix and Postfix allow to define an additional pre-/postfix. The radio-box Separator allows to define a separator which will be inserted between each pair of input-strings. |
Compare | Compare | The first two input strings are compared. The field Case insensitive allows to turn of case-sensitivity (default is case-sensitive). |
Make Lower Case | MakeLowerCase | The input string is converted to all lower case. |
Make Upper Case | MakeUpperCase | The input string is converted to all upper case. |
Replace | Replace | Inside the first string, all occurences of the second string are replaced by the third string. |
Reverse | Reverse | The character-sequence in the input string is reversed. |
Substring | Substring | From the input string, a substring is extracted in the range of From to To. If either of these values exceeds the length of the input-string, the operation will use the largest possible value. |
Format Float | FormatFloat | A floating-point input string is formated to a fix-point number. The number of decimal digits is defined in the precision field (internally limited to 32 digits). Valid input-strings have the following form:
For invalid input strings the result will be zero. |
To ASCII | ToASCII | Takes all ASCII character values from input strings and prints them as unsigned numbers into the result string. All but last numbers are appended with the currently selected separator string. Dependent on the UseHex flag, the numbers are printed as hexadecimal or as decimal numbers. If UseHexPrefix is checked, hexadecimal numbers are prefixed additionally with 0x. |