# fn:string-length - XPath XQuery Reference

Returns the number of characters in a string.deterministiccontext-dependentfocus-dependentdeterministiccontext-independentfocus-independentThe function returns an xs:integer equal to the length in characters of the value of $arg.Calling the zero-argument version of the function is equivalent to calling
               fn:string-length(fn:string(.)).If the value of $arg is the empty sequence, the function returns the
               xs:integer value zero (0).fn:string-length("Harp not on that string, madam; that is past.")45fn:string-length(())0If $arg is not specified and the context item is absent, a dynamic error is raised: .Unlike some programming languages, a codepoint
            greater than 65535 counts as one character, not two.There are situations where fn:string-length() has a different effect
            from fn:string-length(.). For example, if the context item
         is an attribute node typed as an xs:integer with the string value 000001,
         then fn:string-length() returns 6 (the length of the string value of the node), while 
            fn:string-length(.) raises a type error (because the result of atomization
            is not an xs:string).