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 shortened. | |
trimToLength | Number of characters to which the string is to be shortened. Positive values shorten the string from the left, negative values from the right. |
Return value
Type | Description |
---|---|
The truncated 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 |