NAME
RDF::Cowl::Lib::Gen::Class::UString - Generated docs for RDF::Cowl::Ulib::UString
VERSION
version 1.0.0
MAIN MODULE
METHODS
size
Signature:
$self->size()
Params:
UString $string
Documentation:
Returns the size of the string.
@param string String.
@return String size.
C function name: ustring_size
length
Signature:
$self->length()
Params:
UString $string
Documentation:
Returns the length of the string, excluding the null terminator.
@param string String.
@return String length.
C function name: ustring_length
assign
Signature:
$self->assign(PositiveOrZeroInt $length)
Params:
Str $buf
PositiveOrZeroInt $length
Documentation:
Initializes a new string by taking ownership of the specified buffer,
which must have been dynamically allocated.
@param buf String buffer.
@param length Length of the string (excluding the null terminator).
@return New string.
@note The buffer must be null-terminated.
@note Due to the internals of UString, you must not attempt to access the buffer
after calling this function as it may have been deallocated.
C function name: ustring_assign
copy
Signature:
$self->copy(PositiveOrZeroInt $length)
Params:
Str $buf
PositiveOrZeroInt $length
Documentation:
Initializes a new string by copying the specified buffer.
@param buf String buffer.
@param length Length of the string (excluding the null terminator).
@return New string.
@note The buffer must be null-terminated.
C function name: ustring_copy
wrap
Signature:
$self->wrap(PositiveOrZeroInt $length)
Params:
Str $buf
PositiveOrZeroInt $length
Documentation:
Initializes a new string by wrapping the specified buffer.
@param buf String buffer.
@param length Length of the string (excluding the null terminator).
@return New string.
@note The buffer must be null-terminated.
@note If the buffer has been dynamically allocated, you are responsible for its deallocation.
@note You must not call `ustring_deinit` on a string initialized with this function.
C function name: ustring_wrap
_new
Signature:
$self->_new(PositiveOrZeroInt $length)
Params:
UString $string
PositiveOrZeroInt $length
Documentation:
Initializes a new string of the specified length and returns its underlying buffer.
This allows direct initialization of the buffer, avoiding unnecessary allocations or copies.
@param string String to initialize.
@param length Length of the string (excluding the null terminator).
@return Underlying buffer.
@note The returned buffer is null-terminated but otherwise uninitialized.
C function name: ustring
assign_buf
Signature:
$self->assign_buf()
Params:
Str $buf
Documentation:
Initializes a new string by taking ownership of the specified buffer,
which must have been dynamically allocated.
@param buf String buffer.
@return New string.
@note The buffer must be null-terminated.
@note Due to the internals of UString, you must not attempt to access the buffer
after calling this function as it may have been deallocated.
C function name: ustring_assign_buf
copy_buf
Signature:
$self->copy_buf()
Params:
Str $buf
Documentation:
Initializes a new string by copying the specified buffer.
@param buf String buffer.
@return New string.
@note The buffer must be null-terminated.
C function name: ustring_copy_buf
wrap_buf
Signature:
$self->wrap_buf()
Params:
Str $buf
Documentation:
Initializes a new string by wrapping the specified buffer.
@param buf String buffer.
@return New string.
@note The buffer must be null-terminated.
@note If the buffer has been dynamically allocated, you are responsible for its deallocation.
@note You must not call `ustring_deinit` on a string initialized with this function.
C function name: ustring_wrap_buf
dup
Signature:
$self->dup()
Params:
UString $string
Documentation:
Duplicates the specified string.
@param string String to duplicate.
@return Duplicated string.
C function name: ustring_dup
concat
Signature:
$self->concat(Ulib_uint $count)
Params:
UString $strings
Ulib_uint $count
Documentation:
Concatenates the specified strings.
@param strings Strings to concatenate.
@param count Number of strings.
@return Concatenation of the specified strings.
C function name: ustring_concat
join
Signature:
$self->join(Ulib_uint $count, UString $sep)
Params:
UString $strings
Ulib_uint $count
UString $sep
Documentation:
Joins the specified strings with a separator.
@param strings Strings to join.
@param count Number of strings.
@param sep Separator.
@return Strings joined with the specified separator.
C function name: ustring_join
repeating
Signature:
$self->repeating(Ulib_uint $times)
Params:
UString $string
Ulib_uint $times
Documentation:
Returns a new string obtained by repeating the specified string.
@param string String to repeat.
@param times Number of repetitions.
@return New string.
C function name: ustring_repeating
is_upper
Signature:
$self->is_upper()
Params:
UString $string
Documentation:
Checks if the string does not contain lowercase characters.
@param string String.
@return True if the string does not contain lowercase characters, false otherwise.
C function name: ustring_is_upper
is_lower
Signature:
$self->is_lower()
Params:
UString $string
Documentation:
Checks if the string does not contain uppercase characters.
@param string String.
@return True if the string does not contain uppercase characters, false otherwise.
C function name: ustring_is_lower
to_upper
Signature:
$self->to_upper()
Params:
UString $string
Documentation:
Converts the given string to uppercase.
@param string String to convert.
@return Uppercase string.
C function name: ustring_to_upper
to_lower
Signature:
$self->to_lower()
Params:
UString $string
Documentation:
Converts the given string to lowercase.
@param string String to convert.
@return Lowercase string.
C function name: ustring_to_lower
index_of
Signature:
$self->index_of(StrMatch[qr{\A.\z}] $needle)
Params:
UString $string
StrMatch[qr{\A.\z}] $needle
Documentation:
Returns the index of the first occurrence of the specified character.
@param string String to search into.
@param needle Character to find.
@return Index of the first occurrence of the specified character.
If it cannot be found, returns an index greater than or equal to the string's length.
C function name: ustring_index_of
index_of_last
Signature:
$self->index_of_last(StrMatch[qr{\A.\z}] $needle)
Params:
UString $string
StrMatch[qr{\A.\z}] $needle
Documentation:
Returns the index of the last occurrence of the specified character.
@param string String to search into.
@param needle Character to find.
@return Index of the last occurrence of the specified character.
If it cannot be found, returns an index greater than or equal to the string's length.
C function name: ustring_index_of_last
find
Signature:
$self->find(UString $needle)
Params:
UString $string
UString $needle
Documentation:
Returns the index of the first occurrence of the specified string.
@param string String to search into.
@param needle String to find.
@return Index of the first occurrence of the specified string.
If it cannot be found, returns an index greater than or equal to the string's length.
C function name: ustring_find
find_last
Signature:
$self->find_last(UString $needle)
Params:
UString $string
UString $needle
Documentation:
Returns the index of the last occurrence of the specified string.
@param string String to search into.
@param needle String to find.
@return Index of the last occurrence of the specified string.
If it cannot be found, returns an index greater than or equal to the string's length.
C function name: ustring_find_last
starts_with
Signature:
$self->starts_with(UString $prefix)
Params:
UString $string
UString $prefix
Documentation:
Checks whether the string starts with the specified prefix.
@param string String.
@param prefix Prefix.
@return True if the string starts with the specified prefix, false otherwise.
C function name: ustring_starts_with
ends_with
Signature:
$self->ends_with(UString $suffix)
Params:
UString $string
UString $suffix
Documentation:
Checks whether the string ends with the specified suffix.
@param string String.
@param suffix Suffix.
@return True if the string ends with the specified suffix, false otherwise.
C function name: ustring_ends_with
equals
Signature:
$self->equals(UString $rhs)
Params:
UString $lhs
UString $rhs
Documentation:
Checks whether two strings are equal.
@param lhs First string.
@param rhs Second string.
@return True if the two strings are equal, false otherwise.
C function name: ustring_equals
precedes
Signature:
$self->precedes(UString $rhs)
Params:
UString $lhs
UString $rhs
Documentation:
Checks whether lhs precedes rhs in lexicographic order.
@param lhs First string.
@param rhs Second string.
@return True if lhs precedes rhs, False otherwise.
C function name: ustring_precedes
compare
Signature:
$self->compare(UString $rhs)
Params:
UString $lhs
UString $rhs
Documentation:
Compares lhs and rhs in lexicographic order.
@param lhs First string.
@param rhs Second string.
@return -1 if lhs comes before rhs, 0 if they are equal, 1 if lhs comes after rhs.
C function name: ustring_compare
hash
Signature:
$self->hash()
Params:
UString $string
Documentation:
Returns the hash of the specified string.
@param string String.
@return Hash.
C function name: ustring_hash
deinit
Signature:
$self->deinit()
Params:
UString $string
Documentation:
Deinitializes the specified string.
@param string String to deinitialize.
C function name: ustring_deinit
deinit_return_data
Signature:
$self->deinit_return_data()
Params:
UString $string
Documentation:
Deinitializes the specified string, returning its underlying buffer.
@param string String to deinitialize.
@return Buffer.
@note You are responsible for deallocating the returned buffer.
C function name: ustring_deinit_return_data
is_null
Signature:
$self->is_null()
Params:
UString $string
Documentation:
Checks whether the string has a NULL buffer.
@param string String instance.
@return True if the string has a NULL buffer, false otherwise.
C function name: ustring_is_null
is_empty
Signature:
$self->is_empty()
Params:
UString $string
Documentation:
Checks whether the string is empty.
@param string String instance.
@return True if the string is empty, false otherwise.
@note The null string is considered empty.
C function name: ustring_is_empty
AUTHOR
Zakariyya Mughal <zmughal@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2024 by Auto-Parallel Technologies, Inc..
This is free software, licensed under Eclipse Public License - v 2.0.