Difference between DataLength and Length functions

Avatar

Avatar

rahulg1930481

Avatar

rahulg1930481

rahulg1930481

03-01-2021

I was looking into the List of functions available in ACS. I saw two functions DataLength and Length.

NameDescriptionSyntax
DataLengthReturns the number of characters in a stringDataLength(<String>)
LengthReturns the string lengthLength(<string>)

What is the difference between these two functions. Is the difference related to Unicode character length ?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

DavidKangni

MVP

Avatar

DavidKangni

MVP

DavidKangni
MVP

04-01-2021

Hi @rahulg1930481 

DataLength function returns the number of bytes occupy in a variable. It also considered the spaces also.
Length function returns the number of characters in a variable. It also removes the trailing spaces and then return the length.

 

Thanks,

David

Answers (0)