string( object=nil )public
NaN is converted to the string NaN
positive zero is converted to the string 0
negative zero is converted to the string 0
positive infinity is converted to the string Infinity
negative infinity is converted to the string -Infinity
otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values.
An object of a type other than the four basic types is converted to a string in a way that is dependent on that type.
# File lib/rexml/functions.rb, line 115 def Functions::string( object=nil ) #object = @context unless object if object.instance_of? Array string( object ) elsif defined? object.node_type if object.node_type == :attribute object.value elsif object.node_type == :element || object.node_type == :document string_value(object) else object.to_s end elsif object.nil? return "" else object.to_s end end