This is part of the HicEst documentation
LEN_TRIM: Trimmed Length of string or Array
It is the length of a string without counting trailing blanks or of an array without counting trailing zeros.
⇾Home
⇾Contents
⇾more Strings
⇾ Examples
trimmed_length_of_string = LEN_TRIM(string)
! length of string without counting trailing blanks
examples:
CHARACTER
str*100/"abc"/
trimmed_length_of_str = LEN_TRIM(str)
! 3
len_hello = LEN_TRIM("hello ")
! = 5
trimmed_length_of_array = LEN_TRIM(array)
! length of array without counting trailing zeros
examples:
DIMENSION
vector(10), matrix(3,4)
vector = 0
! set all elements to 0
trimmed_length_of_vector = LEN_TRIM(vector)
! 0
vector = (101,102,103)
! assignment to the first 3 elements
trimmed_length_of_vector = LEN_TRIM(vector)
! 3
matrix =
$
! assign 1, 2, .. 12 to matrix
trimmed_length_of_matrix = LEN_TRIM(matrix)
! 12
len_hello = LEN_TRIM("hello ")
! = 5
⇾ Length of a character string or of an array
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.