Functions Index :: Z :: ZStrip

[<< up one level]

Module:

string :: core

Definition:

ZStrip(string fpnum)

Description:

Returns fpnum stripped from leading and trailing zeros if fpnum is a valid string representation of a number, else fpnum unchanged.

Examples:

# strings 1 and 3 are valid numbers, 2 is not

s1 = ZStrip("2.304000") # s1 == "2.304"

s2 = ZStrip("24-10-003") # s2 == "24-10-003"

s3 = ZStrip("023.30240") # s3 == "23.3024"

 

[<< top]