CharBufferString.Length (PROP)

PROPERTY Length : DINT

Determines the length of the string by searching for a terminating zero character (ie. ‘0’ or “0”). The getter will do its work either with native IEC-(W)Strings or with strings coming from external functions. It will return -1 if the given pointer to String is equal NULL.