UTF8Literal (FB)¶
FUNCTION_BLOCK PUBLIC FINAL UTF8Literal EXTENDS _UTF8String
Managing a UTF-8 encoded “immutable” string segment
Modification of the content after creation is not allowed and may result in undefined behavior!
Example for how to convert a “normal” string segment to a
IString
Instance.The last line brings back the pointer and the length of the string segment.
udiLength : UDINT;
fbsValue : STR.UTF8Literal := (psValue:=ADR(UTF8#'CØD€šŸŠ ïß värÿ çôõl'));
psValue : POINTER TO STRING := fbsValue.GetSegment(udiLength => udiLength);
- InOut:
Scope
Name
Type
Input Const
psValue
POINTER TO STRING
Methods:
GetSegment, inherited from _UTF8String
IsASCII, inherited from _UTF8String
IsValid, inherited from _UTF8String
Len, inherited from _UTF8String
ToIString, inherited from _UTF8String
Structure: