F_RTrim

F_RTrim 1:

Truncates all trailing spaces from the specified value and returns the result.

F_RTrim 2: Return value

Name

Type

Description

F_RTrim

T_MaxString

 

F_RTrim 3: Inputs

VAR_INPUT
    in : T_MaxString;
END_VAR

Name

Type

Description

in

T_MaxString

The string to be converted (type: T_MaxString).

Example:

PROGRAM MAIN
VAR
    sRTrim  : STRING;
    sLRTrim : STRING;
END_VAR
sRTrim := F_RTrim(' trim> ');(* result: ' trim>' *)
sRTrim := F_RTrim('trim> ');(* result: 'trim>' *)
sRTrim := F_RTrim('trim>');(* result: 'trim>' *)
sRTrim := F_RTrim('');(* result: '' *)

sLRTrim := F_RTrim( F_LTrim( ' <trim> '));(* result: '<trim>' *)

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, Arm®)

Tc2_Utilities (System)