Core Function BinaryFromStr
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> BinaryFromStr( <string> ) </pre> === Description === Returns a new binary variable created from a strings raw bytes === Parameters === ==== string ==== The string to ...") |
(→Example) |
||
Line 22: | Line 22: | ||
=== Example === | === Example === | ||
+ | |||
+ | |||
+ | ASCII Example | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | $binary = Pack(" | + | $binary = Pack("A*", "Hello World!"); |
− | + | ||
− | + | ||
− | + | ||
$binStr = BinaryToStr($binary); | $binStr = BinaryToStr($binary); | ||
echo "String Content: $binStr\n"; | echo "String Content: $binStr\n"; | ||
− | + | // Prints: | |
− | + | // String Content: Hello World! | |
− | + | ||
− | / | + | |
− | Prints: | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | String Content: Hello World! | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 15:31, 26 September 2013
BinaryFromStr( <string> )
Contents |
Description
Returns a new binary variable created from a strings raw bytes
Parameters
string
The string to use.
Return Value
Returns a new binary variable created from a strings raw bytes
Remarks
None.
Example
ASCII Example
$binary = Pack("A*", "Hello World!"); $binStr = BinaryToStr($binary); echo "String Content: $binStr\n"; // Prints: // String Content: Hello World!