TrimToLength
function TrimToLength(value: string | null, trimToLength: number | string | null): string | null
The function TrimToLength shortens a string to a specified number of characters from left or right.
Parameter
Name |
Type |
Description |
---|---|---|
value |
String to be trimmed. | |
trimToLength |
Number of characters to which the string is to be trimmed. Positive values trim the string from the left, negative values from the right. |
Return value
Type |
Description |
---|---|
The trimmed string or null if anything other than string was passed. |
NuGet package: Beckhoff.TwinCAT.HMI.Functions
![]() | NuGet packages are available from version 1.12. |
![]() | Available from 1.8 |