TABLE OF CONTENTS


ksi/str [ Modules ]

[ Top ] [ Modules ]

NAME

    str - the string handling module

DESCRIPTION

    This module contains functions related to the handling of the
    strings.  It contains, for example, functions for comparison,
    conversion, copying and other.

str/parse_hex, parse_integer [ Functions ]

[ Top ] [ str ] [ Functions ]

NAME

    parse_hex, parse_integer - parse strings, convert to numbers

SYNOPSIS

    parse_hex: procedure (pstr, pnum)
    parse_integer: procedure (pstr, pnum)

DESCRIPTION

    The parse functions parse hexadecimal and decimal strings and
    put the result in pnum.  The parse_hex function parses an
    unsigned hexadecimal number, and the parse_integer parses a
    isgned decimal number.

RETURN VALUE

    These functions do not return any value.

str/string_compare, string_length,
string_copy [ Functions ]

[ Top ] [ str ] [ Functions ]

NAME

    string_compare, string_length, string_copy - functions for
        string comparison, length and copying

SYNOPSIS

    string_compare: procedure (pstr1, pstr2): integer
    string_length: procedure (pstr): word
    string_copy: procedure (psrc, dest_len, pdest): word
    string_reverse: procedure (pstr)

DESCRIPTION

    The function string_compare performs a comparison on strings and
    returns 0 if they are equal.  Otherwise, a positive value if
    pstr1 is greater in character codes, otherwise, returns a negative
    value.
    The function string_length determines the length of a
    null-terminated string.
    string_copy copies the string from psrc to pdest, with the limit
    of dest_len characters.
    The function string_reverse reverses a string in place.

RETURN VALUE

    string_compare: returns the result of the comparison of the two
    strings, 0 if they are equal, a negative value if the first
    of the two strings is before the second in ASCII ordering, and
    a positive value otherwise.
    string_length returns the length of the string.
    string_copy returns the number of characters copied.
    The function string_reverse does not return any value.

str/to_hex_string, to_integer_string [ Functions ]

[ Top ] [ str ] [ Functions ]

NAME

    to_hex_string, to_integer_string - convert number to string

SYNOPSIS

    to_hex_string: procedure (num, pbuf)
    to_integer_string: procedure (num, pbuf)

DESCRIPTION

    These functions covert a number num to a string that is stored
    in pbuf.  It is assumed that pbuf is big enough to contain
    the string representation of the number.
    The function to_hex_string writes the number as a hexadecimal
    string with lowercase letters, the number is read as unsigned,
    whereas the function to_integer_string writes a signed decimal
    number into the buffer, including the minus sign for negative
    numbers.

RETURN VALUE

    These function do not return any value.