Convert any-to-string
Aus ExpeccoWiki
Inhaltsverzeichnis |
Schema
Operation
- Converts the value of its input to a string-representation. For most objects, except for collections of integer numbers, this is the same as the printed-string. For collections of integer numbers, each integer is taken as the codePoint of a a string consisiting of
- Very similar to Convert [ Any to PrintedString ] , but converts an array of integers into an array of corresponding characters (1-to-1 by unicode point). This might not be what you want.
Examples
any-to-string( 12345 ) -> "12345" (Number to String)
any-to-string( #[80 81 82 ] ) -> "PQR" (ByteArray to String)
any-to-string( #(80 81 82 ) ) -> "PQR" (Array to String)
Bugs
In versions prior to 1.7, non-byte values strings were not handled correctly (i.e. byte-values must be within 0..255). This has been fixed with 1.7 so that Unicode16- or Unicode32-strings are generated as required.
Revisions
This block has been in the Standard Library since 1.0. Fixed for 16- and 32bit character values with 1.7
Back to Standard Library.
Previous: Convert [ Any To PrintedString ]
Next: Convert [ Any To PaddedString ]
