1Binary.pokeString(3kaya) Kaya module reference Binary.pokeString(3kaya)
2
3
4
6 Binary::pokeString - Write a String of binary data.
7
9 Void pokeString( Binary block, Int offset, String val )
10
12 block The binary block
13
14 offset The location to write to (starting from zero)
15
16 val The String to write.
17
19 Poke the string val into the block, starting at offset offset
20 An Binary.OffsetOutOfRange (3kaya) exception will be thrown if it
21 attempts to access a value outside the block. Note that the String will
22 be stored in the block in UTF-8 encoding, not as raw Kaya chars, so you
23 need to use Builtins.byteLength (3kaya) to determine how much space you
24 need (and then add one for a terminating null byte).
25
27 Kaya standard library by Edwin Brady, Chris Morris and others
28 (kaya@kayalang.org). For further information see http://kayalang.org/
29
31 The Kaya standard library is free software; you can redistribute it
32 and/or modify it under the terms of the GNU Lesser General Public
33 License (version 2.1 or any later version) as published by the Free
34 Software Foundation.
35
37 Binary.Binary (3kaya)
38 Builtins.byteLength (3kaya)
39 Binary.peekString (3kaya)
40 Binary.poke (3kaya)
41 Binary.setBlockData (3kaya)
42
43
44
45Kaya December 2010 Binary.pokeString(3kaya)