--- a/branches/develop/mqttsparkplug/mqttsparkplug/Sparkplug™ MQTT edge and host/Function Blocks/FB_WStringBuilder/FB_WStringBuilder/InsertAt/svnobj
+++ b/branches/develop/mqttsparkplug/mqttsparkplug/Sparkplug™ MQTT edge and host/Function Blocks/FB_WStringBuilder/FB_WStringBuilder/InsertAt/svnobj
@@ -1,13 +1,61 @@
-Gx_l!0…jüoæà
-…ò.‹»System.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
-longTagText
L_workWSTRING := WINSERT( _WorkWSTRING,<                         Text,H                         Position );$InsertAt := THIS^;InterfaceL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}BMETHOD InsertAt : IWSTRINGBuilderVAR_INPUT2    Text : WSTRING(4096);&    Position : INT;END_VARÐÐÐEÐÐ	
-­GÚÐ-
ÐÐ	
-­:ÚÐ-ÐÐ	
-­;ÚÐ-ÐÐ	
-­ÚÐ-ÐÐEÐÐ	
-­5ÚÐ-ÐÐ	
-­6ÚÐ-ÐÐ	
-­7ÚÐ-ÐÐ	
-­8ÚÐ-ÐÐ	
-­ÚÐ-ÐÐ	
-­?ÚÐ-
\ No newline at end of file
+Gx_lF!0…jüou
¡ØN©8JhíSystem.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
+longTagText
¬(************************************************************************************)P(* Init: internal pointer and counter *)H	pwTempDestStr	:= ADR(_workWSTRING);4	pwTempStr1		:= ADR(Text);¬(*----------------------------------------------------------------------------------*)@CurrentLength    := THIS^.Len();XAdditionalLength := Stu.StrLenW(pwTempStr1);jTotalLength      := CurrentLength + AdditionalLength;V(* Loop: Move the rightmost to make room *)~FOR i := MIN(TotalLength,GC_sparkplug.supported_string_lengths)\     TO (Position + AdditionalLength) BY -1 DO~	pwTempDestStr[i -1] := pwTempDestStr[i -1 - AdditionalLength];END_FORD(* Loop: Insert additional Text *)FOR i := 0 ®     TO MIN(GC_sparkplug.supported_string_lengths - Position, AdditionalLength) BY 1 DOd	pwTempDestStr[Position + i - 1] := pwTempStr1[i];0(* Set: End of string *) š	pwTempDestStr[MIN(TotalLength,GC_sparkplug.supported_string_lengths)+1]:= 0;!.(* Set: Return value *)"&	InsertAt := THIS^;#Interface$L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}%t// If there are too many characters to fit in the buffer, &// this funciton will always trim the rightmost charcaters of the result'BMETHOD InsertAt : IWSTRINGBuilder(&VAR_IN_OUT CONSTANT)t    Text : WSTRING(GC_sparkplug.supported_string_lengths);*END_VAR+VAR_INPUT,v    Position : INT; // to insert at the start, it will be 1-VAR.B	pwTempDestStr : POINTER TO WORD;/D	pwTempStr1     : POINTER TO WORD;0	i : DINT;10	AdditionalLength: DINT;2*	CurrentLength: DINT;3&	TotalLength: DINT;ÐÐÐE(ÐÐ	
+­QÚÐ-
ÐÐ	
+­RÚÐ-ÐÐ	
+­SÚÐ-
ÐÐ	
+­TÚÐ-ÐÐ	
+­UÚÐ-ÐÐ	
+­XÚÐ-ÐÐ	
+­YÚÐ-ÐÐ	
+­ZÚÐ-ÐÐ	
+­™ÚÐ-ÐÐ	
+­žÚÐ-ÐÐ	
+­¢ÚÐ-ÐÐ	
+­£ÚÐ-
ÐÐ	
+­¤ÚÐ-ÐÐ	
+­¥ÚÐ-
ÐÐ	
+­¡ÚÐ-ÐÐ	
+­­ÚÐ-ÐÐ	
+­«ÚÐ-ÐÐ	
+­¬ÚÐ-ÐÐ	
+­¯ÚÐ-ÐÐ	
+­±ÚÐ-
ÐÐ	
+­²ÚÐ-ÐÐ	
+­³ÚÐ-
ÐÐ	
+­´ÚÐ-ÐÐ	
+­µÚÐ-ÐÐ	
+­¶ÚÐ-ÐÐ	
+­°ÚÐ-ÐÐ	
+­ÚÐ-ÐÐ	
+­ŽÚÐ-
ÐÐ	
+­ÚÐ-ÐÐ	
+­ÚÐ-
ÐÐ	
+­‘ÚÐ- ÐÐ	
+­’ÚÐ-ÐÐ	
+­“ÚÐ-ÐÐ	
+­”ÚÐ-ÐÐ	
+­•ÚÐ-
ÐÐ	
+­–ÚÐ-!ÐÐ	
+­—ÚÐ-
ÐÐ	
+­˜ÚÐ-"ÐÐ	
+­;ÚÐ-ÐÐ	
+­ÚÐ-Ð#$ÐEÐÐ	
+­ŸÚÐ-%ÐÐ	
+­ ÚÐ-&ÐÐ	
+­5ÚÐ-'ÐÐ	
+­6ÚÐ-(ÐÐ	
+­7ÚÐ-)ÐÐ	
+­HÚÐ-*ÐÐ	
+­IÚÐ-+ÐÐ	
+­8ÚÐ-,ÐÐ	
+­ÚÐ-*ÐÐ	
+­šÚÐ-ÐÐ	
+­›ÚÐ--ÐÐ	
+­œÚÐ-.ÐÐ	
+­®ÚÐ-/ÐÐ	
+­¦ÚÐ-0ÐÐ	
+­§ÚÐ-ÐÐ	
+­¨ÚÐ-1ÐÐ	
+­©ÚÐ-2ÐÐ	
+­ªÚÐ-3ÐÐ	
+­?ÚÐ-*
\ No newline at end of file