time-to-botec/js/node_modules/@stdlib/buffer/from-string/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

29 lines
508 B
Plaintext

{{alias}}( str[, encoding] )
Allocates a buffer containing a provided string.
Parameters
----------
str: string
Input string.
encoding: string (optional)
Character encoding. Default: 'utf8'.
Returns
-------
out: Buffer
Buffer instance.
Examples
--------
> var b = {{alias}}( 'beep boop' )
<Buffer>
> b = {{alias}}( '7468697320697320612074c3a97374', 'hex' );
> b.toString()
'this is a tést'
See Also
--------