Length Conversion (L)

Top  Previous  Next

 

The length conversion code performs string length constraint checks. It works identically on input and output conversions and has three forms:

 

LReturns the length of the string being converted.
LnReturns the original string if its length is less than or equal to n. Otherwise it returns a null string.
Ln,m Returns the original string if its length is greater than or equal to n and less than or equal to m. Otherwise it returns a null string.

 

 

Examples

 

Conversion

Data

Result

L

1234

4

L3

A

A

L3

AB

AB

L3

ABC

ABC

L3

ABCD

 

L2,3

A

 

L2,3

AB

AB

L2,3

ABC

ABC

L2,3

ABCD