Next: , Previous: , Up: The Byte Data Library   [Index]


13.9.2 Byte Data Functions

b_append

data b_append(data d, integer c);

is d, appends the c character to the d byte array

b_character

integer b_character(data d, integer p);

is the (positively defined value of the) p indexed character in the d byte array (negative item indications are interpreted with respect to the end of string)

See Negative Indices.

b_clear

data b_clear(data d);

is d, clears the d byte array

b_compare

integer b_compare(data d, data v);

is 0 if d is (case sensitive) same as v, less than 0 if d is less than v and greater than 0 if d is greater than v (much like ‘compare’(‘b_string’(d), ‘b_string’(v)))

See Math And Text Utilities.

b_cut

text b_cut(data d, integer p, integer n);

is the string starting at position p and extending n bytes in the d byte array (negative position indications are interpreted with respect to the end of string, negative spans indicate ranges ahead the position) (same as ‘be_string’)

See Negative Indices.

b_delete

data b_delete(data d, integer p);

is d, deletes the p indexed character in the d byte array (negative item indications are interpreted with respect to the end of string)

See Negative Indices.

b_drop

data b_drop(data d, text w);

is d, removes all occurences of the w bytes in the d byte array

b_dump

data b_dump(data d, integer c);

is d, removes all occurences of the c character in the d byte array

b_edit

data b_edit(data d, integer p, integer e);

is d, deletes e characters or as many as available after the p position in the d byte array if e is positive, e characters or as many as available prior the p position otherwise (negative position indications are interpreted with respect to the end of string)

See Negative Indices.

b_erase

data b_erase(data d, integer p, integer q);

is d, deletes the p to q indexed characters in the d byte array (negative item indications are interpreted with respect to the end of string). If q indicates a character prior to p the characters starting with the p indexed one to the end of the array and those from the beginning of the array to the q indexed one are deleted (as if d was circular).

See Negative Indices.

b_initial

integer b_initial(data d);

is the first character in the d byte array

b_insert

data b_insert(data d, integer p, integer c);

is d, inserts character c in the p position in the d byte array (negative position indications are interpreted with respect to the end of string)

See Negative Indices.

b_length

integer b_length(data d);

is the length (byte count) of the d byte array

b_mold

text b_mold(text &s, data d);

is the d byte array content, sets s as the same

b_msbfn

cardinal b_msbfn(data d, integer p, integer n);

is the (most significant byte first) cardinal interpretation of byte sequence starting at position p and extending n bytes in the d byte array (negative position indications are interpreted with respect to the end of string, negative spans indicate ranges ahead the position)

See Negative Indices.

b_msbfvn

cardinal b_msbfvn(data d, integer &p);

is the (most significant byte first) unsigned varint interpretation of byte sequence starting at position p in the d byte array (negative position indications are interpreted with respect to the end of string). p is updated to indicate the first byte after. 7 bits in each byte are picked up to form the read value, with the most significant indicating whether another byte follows.

See Negative Indices.

b_new

void b_new(data &d);

sets the d byte array as a new byte array (same as ‘b_clear’ if d is not linked multiple times, otherwise creates a new byte array and sets d as a reference to the new byte array)

b_prefix

integer b_prefix(data d, data v);

is the number of characters matching at the beginning of d and v (the length of the longest common prefix)

b_project

text b_project(data d, integer p);

is the d byte array after position p (negative position indications are interpreted with respect to the end of string) (same as ‘bp_string’)

See Negative Indices.

b_replace

integer b_replace(data d, integer p, integer c);

is the (positively defined value of the) p indexed character in the d byte array, after it was replaced by c (negative item indications are interpreted with respect to the end of string)

See Negative Indices.

b_reverse

data b_reverse(data d);

is d, reverses the order of the characters in the d byte array

b_set

data b_set(data &d, data v);

is v, sets the d byte array as a reference of the v byte array

b_size

data b_size(data d, integer n);

is d, resizes the d byte array as n bytes long

b_squeeze

data b_squeeze(data d, text w);

is d, remove all (previous character) repeating occurences of the w characters in the d byte array

b_string

text b_string(data d);

is the d byte array content

b_swap

void b_swap(data d, data v);

exchanges the content of the d and v byte arrays

b_translate

data b_translate(data d, text w, text z);

is d, replaces the d byte array characters in the w character set with their position correspondent in the z character set

b_turn

data b_turn(data d, integer c, integer f);

is d, replaces the c character in the d byte array with f

bb_drop

data bb_drop(data d, text w);

is d, removes all occurences of the w bytes at the back of the d byte array

bb_drop0

data bb_drop0(data d, text w);

is d, remove all occurences of the zero and w bytes at the back of the d byte array

be_string

text be_string(data d, integer p, integer e);

is the string starting at position p and extending e bytes in the d byte array (negative position indications are interpreted with respect to the end of string, negative spans indicate ranges ahead the position) (same as ‘b_cut’)

See Negative Indices.

bf_drop

data bf_drop(data d, text w);

is d, removes all occurences of the w bytes at the front of the d byte array

bf_drop0

data bf_drop0(data d, text w);

is d, removes all occurences of the zero and w bytes at the front of the d byte array

bp_compare

integer bp_compare(data d, integer p, data v);

is 0 if d from position p onwards is (case sensitive) same as v, less than 0 if d is less than v and greater than 0 if d is greater than v (much like ‘compare’(‘b_project’ (d, p), ‘b_string’(v)))

See Negative Indices.

bp_string

text bp_string(data d, integer p);

is the string starting after position p (negative position indications are interpreted with respect to the end of string) (same as ‘b_project’)

See Negative Indices.

bq_string

text bq_string(data d, integer p, integer q);

is the string starting with the p indexed character and ending with the q indexed character in the d byte array (negative item indications are interpreted with respect to the end of string). If q indicates a character prior to p the selection string wraps around (as if d was circular).

See Negative Indices.


Next: , Previous: , Up: The Byte Data Library   [Index]