String Functions

These functions read and edit strings or parts of strings. Individual characters within a character string (for instance the string variable word) can be read in the form word[i]. The smallest index is zero. A string cannot be written or overwritten on a character-by-character basis, however.

Whereas word is of type string, word[i] is of type char.

WinCC OA string functions work Byte-oriented and independent of the coding type of the used characters. Comparisons of character strings (for example >,< ) are always done Byte by Byte. Due to this reason you might get unexpected results when you for example compare two strings, one using ISO standard coding and the other using UTF-8 coding.

For example, when processing a string using UTF-8 coding in the format of "%10s" into Cyrillic characters (one character is coded with 2 Bytes), then a string with 5 Cyrillic characters (each being 2 Bytes long) is the result.

For more information please refer to list with all available languages and coding and fonts in WinCC OA.

ISO projects cannot be created anymore. Create UTF-8 projects instead.

String Methods

The String object provides following methods:

String Functions

The following functions are available for strings:

You can find the Unicode string functions in the following table:

The uni string functions return characters, NOT bytes.