NAME
RDF::Cowl::Lib::Gen::Class::String - Generated docs for RDF::Cowl::String
VERSION
version 1.0.0
MAIN MODULE
CONSTRUCTORS
new
Signature:
RDF::Cowl::String->new()
Params:
UString $string
Documentation:
Returns a retained string.
@param string The underlying string object.
@return Retained string. Throws exception on error.
@note The buffer of the raw string must have been dynamically allocated.
@note Ownership of the raw string is transferred to the newly created CowlString,
meaning you must not deinitialize it.
@note Equivalent to `cowl_string_opt(string, COWL_SO_NONE)`.
Throws exception on error.
C function name: cowl_string
opt
Signature:
RDF::Cowl::String->opt(CowlStringOpts $opts)
Params:
UString $string
CowlStringOpts $opts
Documentation:
Returns a retained string.
String creation is governed by the following options:
- COWL_SO_COPY: if set, the raw string is copied internally, otherwise it is directly assigned.
Note that in the latter case the raw string must have been dynamically allocated,
and you must not deinitialize it after passing it to this method.
- COWL_SO_INTERN: if set, the CowlString is either created and added to an internal
instance pool, or if an instance with the same raw string already exists
in the pool, that instance is retained and returned. This entails that
all instances created with this flag are guaranteed to be unique in memory.
@param string The underlying string object.
@param opts String creation options.
@return Retained string. Throws exception on error.
Throws exception on error.
C function name: cowl_string_opt
empty
Signature:
RDF::Cowl::String->empty()
Documentation:
Returns a retained empty string.
@return Retained string. Throws exception on error.
Throws exception on error.
C function name: cowl_string_empty
METHODS
intern
Signature:
$self->intern()
Params:
CowlString $string
Documentation:
Interns the specified string.
The string is either added to an internal instance pool, or if an instance with the same
raw string already exists in the pool, that instance is returned.
@param string The string.
@return Interned string.
@note The reference counts of the original string and that of the returned instance are not
changed. This means you are still responsible for releasing the original string if
you created it, and you should retain the returned string if you need to keep it alive.
C function name: cowl_string_intern
release_copying_cstring
Signature:
$self->release_copying_cstring()
Params:
CowlString $string
Documentation:
Releases the specified string, returning its buffer as a copy.
@param string The string.
@return The copied buffer.
@note As an optimization, if the string is deallocated due to the release call,
then the original buffer is returned.
C function name: cowl_string_release_copying_cstring
get_length
Signature:
$self->get_length()
Params:
CowlString $string
Documentation:
Gets the length of the string, excluding the NULL terminator.
@param string The string.
@return The length.
C function name: cowl_string_get_length
get_raw
Signature:
$self->get_raw()
Params:
CowlString $string
Documentation:
Gets the underlying string object.
@param string The string.
@return Underlying string object.
C function name: cowl_string_get_raw
concat
Signature:
$self->concat(CowlString $rhs)
Params:
CowlString $lhs
CowlString $rhs
Documentation:
Returns a retained string obtained by concatenating two strings.
@param lhs LHS of the concatenation.
@param rhs RHS of the concatenation.
@return Retained string. Throws exception on error.
Throws exception on error.
C function name: cowl_string_concat
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.