String

Navigation:  Client commands > Tools > Client command editor > Command list >

String

Version 1.0.0

Show hidden text

hmtoggle_arrow1Cut string

With this command you can split a string (string). Thus, it can extract information from a variable, which was previously written by a different command in the variables.

 

Simply enter the source code (e.g., a variable such as %Info%) in the Details tab. Furthermore, a variable (variable name) is required, in which the result is to be.

 

In the options you can specify how the given string to be broken:

 

From the first letter to the last letters

It is extracted a string, which extends from the beginning of the specified string to the specified final letters. This string is written to the variable.

 

From the first letter to the last letter

It is a string extracted, which extends from the specified first letter to the end of the string. This string is written to the variable.

 

From the beginning until the final letters

It is extracted a string, and the specified   First letter reaches to the specified final letters. This string is written to the variable.

 

The initial and final letter must be specified in the hotel next to underlying input fields. Here you can also specify an alphanumeric character or a position.

 

5.8.3.2.27 - CutString

 

When a character / digit of the given string is there started / stopped, where this character is encountered for the first time. When a digit, the option can be selected as the location. Here, the x-th letter is selected from the front as a marker for the beginning / end of the new string. In the preview the data with a sample rate can be controlled.

 

hmtoggle_arrow1Cut filename

With this command you can disassemble the path of a file. You enter under the Details tab in the source code (eg, a variable such as %info%) as well as a variable in which the result is stored. Under Options, specify what you need as information from this path. Here are the options with the example path C: Aagon aagon.ini

 

Option

Result

Extract file name (with extension)

aagon.ini

Extract file name (without extension)

aagon

Extract file extension

ini

Extract path

C:\Aagon

Extract drive

C

 

hmtoggle_arrow1StringList

With this command you can attach a string to a variable. You enter under the Details tab in the value that is to be appended to the area to be entered variable. The individual strings are separated by a semicolon. Thus, the information can be resolved later example with the Cut command string again.

 

hmtoggle_arrow1Position

With this command you can find the position of a part of text within a longer string. The position value can be used for the Cut command string eg.

 

You enter under the Details tab in the source code (eg, a variable such as %info%) and the sub text which is to be found in the source code. In the Options section, you can specify an offset to skip eg misinformation.

 

Also can be started with searching from the beginning or end of the source code. If it is necessary, you can also consider the case.

 

Finally, you specify the variable in which the result (the position) to be saved. The result can be 0 if no part of the text is found or the offset less than one or greater than the source has been selected.

 

Hinweis

Note:

Before further use of the position information, this should be checked with an if-else command to avoid trouble.

 

5.8.3.2.27 - Position

 
hmtoggle_arrow1Replace string

With this command you can replace a substring within a source string. You enter under the Details tab of the source (eg, a variable such as% info%), the string to replace (old string) and the new string to.

 

Among the options you can consider the case and setting whether all occurrences will be replaced. If the latter option is not used, only the first occurrence of the old string is replaced with the new. Finally, you specify a variable in which the result is to be stored (see Variables).

 

hmtoggle_arrow1Trim string

With this command you can remove the spaces at the beginning and end of a string. To do this, under the Details tab the source code (eg, a variable such as% info%) and a variable (see Variables), in which the result is to be stored.

 

hmtoggle_arrow1Upper/lower case

With this command you can convert a string to uppercase or lowercase. To do this, under the Details tab the source code (eg, a variable such as% info%) and a variable (see Variables), in which the result is to be stored. Options allows you to choose whether to be converted to uppercase or lowercase.

 

hmtoggle_arrow1String length

With this command you can determine the length of a string. To do this, under the Details tab the source code (eg, a variable such as% info%) and a variable (see Variables), in which the result is to be stored.

 

hmtoggle_arrow1Reverse string

With this command you can turn a string around (Hallo => ollaH) by entering the source text (e.g. a variable such as %info%) and a variable in which the result is to be stored (see Variables) in the Details tab.

 

hmtoggle_arrow1Substring count

With this command you can find out how often a certain text occurs in another text. by entering the source text (e.g. a variable such as %info%) and a variable in which the result is to be stored (see The sub text is then searched in the source code. In Options you can select a case-sensitive search. You also have to enter a variable (see Variables) where the result is to be stored.

 

hmtoggle_arrow1Split string

With this command, you can separate a text based on a delimiter. This, you enter under the Details tab first to the text to be split. This text can be entered directly of by means of a variable in %Variablenname% format. You then specify the delimiter with which the text is to be separated. Last you need to specify a variable in which the result of the operation is stored.

 

The text This is some text with the spaces as delimiters, is in the variable VAR Format 0 = this, 1 =, 2 = a, 3 = Text, Count = 4 saved. The variable VAR, you can now continue to use by% Var.1% for this, Var.2%% is for specifying etc.. %VAR.Count% will put out the number of text elements (e.g., for loops).

Last change on 10.03.2014