Changes

Jump to navigation Jump to search
169 bytes added ,  03:00, 27 May 2012
no edit summary
=Binary Data=
==convert:to-bytesstring==
{|
|-
| width='90' | '''Signatures'''
|{{Func|convert:to-string|$bytesas basex:binary|xs:string}}<br/>{{Func|convert:to-string|$bin bytes as basex:binary, $encoding as xs:string|xs:byte*string}}
|-
| '''Summary'''
|Extracts Converts the bytes from the given specifed binary data ({{Code|xs:base64Binary}}, {{Code|xs:hexBinary}}) to a string.<br/>The UTF-8 default encoding can be overwritten with the optional {{Code|$binencoding}}argument.
|-
| '''Examples'''
|
* <code>convert:to-bytes(xs:base64Binary('QmFzZVggaXMgY29vbA=='))</code> returns the sequence {{Code|(66, 97, 115, 101, 88, 32, 105, 115, 32, 99, 111, 111, 108)}}.* {{Code|convert:to-bytesstring(xs:hexBinary("4261736558"'48656c6c6f576f726c64'))}} returns the sequence string {{Code|(66 97 115 101 88)HelloWorld}}.
|}
==convert:to-stringbytes==
{|
|-
| width='90' | '''Signatures'''
|{{Func|convert:to-stringbytes|$bytes bin as basex:binary, $encoding as xs:string|xs:stringbyte*}}
|-
| '''Summary'''
|Converts Extracts the specifed {{Code|bytes}} to a string, using from the optional given binary data {{Code|$encodingbin}}.
|-
| '''Examples'''
|
* <code>convert:to-bytes(xs:base64Binary('QmFzZVggaXMgY29vbA=='))</code> returns the sequence {{Code|(66, 97, 115, 101, 88, 32, 105, 115, 32, 99, 111, 111, 108)}}.* {{Code|convert:to-stringbytes(xs:hexBinary('48656c6c6f576f726c64'"4261736558"))}} returns the string sequence {{Code|HelloWorld(66 97 115 101 88)}}.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu