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


12.9.2 Byte Data Functions

b_append

void b_append(data d, integer c);

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

void b_clear(data d);

clears the d byte array

b_compare

integer b_compare(data d, data e);

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

See Math And Text Utilities.

b_delete

void b_delete(data d, integer p);

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_draft

data b_draft(text s);

is a byte array set as s

b_drop

void b_drop(data d, text w);

remove all occurences of the w characters in the d byte array

b_dump

void b_dump(data d, integer c);

remove all occurences of the c character in the d byte array

b_edit

void b_edit(data d, integer p, integer k);

deletes k characters or as many as available after the p position in the d byte array if k is positive, k characters or as many as available prior the p position otherwise (negative position indications are interpreted with respect to the end of string) (same as ‘b_scrap’(d, p, k) for positively defined k)

See Negative Indices.

b_erase

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

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

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

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_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_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_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)

See Negative Indices.

b_replace

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

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

See Negative Indices.

b_reverse

void b_reverse(data d);

reverses the order of the characters in the d byte array

b_scrap

void b_scrap(data d, integer p, integer n);

deletes n characters following the p position in the d byte array (negative position indications are interpreted with respect to the end of string) if n are available, as many as available otherwise, n assumed positively defined

See Negative Indices.

b_set

data b_set(data &d, data e);

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

b_size

void b_size(data d, integer n);

resizes the d byte array as n bytes long

b_slip

void b_slip(data d, integer c);

remove all occurences of the c character in the d byte array

b_squeeze

void b_squeeze(data d, text w);

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

b_swap

void b_swap(data d, data e);

exchanges the content of the d and e byte arrays

b_translate

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

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

b_turn

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

replaces the c character in the d byte array with f

be_string

text be_string(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)

See Negative Indices.

bp_compare

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

is 0 if d is (case sensitive) same as e from position p onwards, less than 0 if d is less than e and greater than 0 if d is greater than e

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]