#10 Find or create a Codesys solution for: FUNCTION F_LTrim

v1.0
closed
aliazzz
None
2020-05-01
2019-05-04
aliazzz
No

https://infosys.beckhoff.com/english.php?content=../content/1033/tcplclib_tc2_utilities/18014398544608779.html&id=

Removes leading spaces from the character string and returns the reduced character string.
FUNCTION F_LTrim: T_MaxString
VAR_INPUT

VAR_INPUT
in : T_MaxString;
END_VAR

in: The string to be converted (Type:T_MaxString).

Example:

PROGRAM MAIN
VAR
    sLTrim : STRING;
END_VAR

sLTrim := F_LTrim(' <trim ');(* result: '<trim ' *)
sLTrim := F_LTrim(' <trim');(* result: '<trim' *)
sLTrim := F_LTrim('<trim');(* result: '<trim' *)
sLTrim := F_LTrim('');(* result: '' *)

Discussion

  • aliazzz

    aliazzz - 2019-05-04
    • summary: F_LTrim --> FUNCTION F_LTrim
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,25 @@
     https://infosys.beckhoff.com/english.php?content=../content/1033/tcplclib_tc2_utilities/18014398544608779.html&id=
    +
    +Removes leading spaces from the character string and returns the reduced character string.
    +FUNCTION F_LTrim: T_MaxString
    +VAR_INPUT
    +
    +> VAR_INPUT
    +>     in  : T_MaxString;
    +> END_VAR
    +
    +in: The string to be converted (Type:T_MaxString).
    +
    +Example:
    +
    +~~~
    +PROGRAM MAIN
    +VAR
    +    sLTrim : STRING;
    +END_VAR
    +
    +sLTrim := F_LTrim(' <trim ');(* result: '<trim ' *)
    +sLTrim := F_LTrim(' <trim');(* result: '<trim' *)
    +sLTrim := F_LTrim('<trim');(* result: '<trim' *)
    +sLTrim := F_LTrim('');(* result: '' *)
    +~~~
    
     
  • aliazzz

    aliazzz - 2019-05-04
    • summary: FUNCTION F_LTrim --> Find or create a Codesys solution for: FUNCTION F_LTrim
     
  • aliazzz

    aliazzz - 2019-05-04
    • status: open --> closed
    • assigned_to: aliazzz
     
  • aliazzz

    aliazzz - 2019-05-05

    Ticket moved from /prj/tcunit4codesys/tickets/7/

     
  • aliazzz

    aliazzz - 2019-05-05

    Ticket moved from /prj/csunit/tickets/10/

     

Log in to post a comment.