Index

Package: String

Description

package Glib.String is
The GString struct contains the public fields of a GString.

Types

Gstring

type Gstring is record
      Str : Interfaces.C.Strings.chars_ptr;
      Len : Gsize;
      Allocated_Len : Gsize;
   end record;

Subprograms & Entries

From_Object_Free

function From_Object_Free 
(B: access Gstring) return Gstring;

Get_Type

function Get_Type return Glib.GType;

Append

function Append 
(Self: Gstring;
Val: UTF8_String) return Gstring;
Adds a string onto the end of a Glib.String.Gstring, expanding it if necessary. "val": the string to append onto the end of String

Append_C

function Append_C 
(Self: Gstring;
C: Gchar) return Gstring;

Append_Len

function Append_Len 
(Self: Gstring;
Val: UTF8_String;
Len: Gssize) return Gstring;
Appends Len bytes of Val to String. Because Len is provided, Val may contain embedded nuls and need not be nul-terminated. Since this function does not stop at nul bytes, it is the caller's responsibility to ensure that Val has at least Len addressable bytes. "val": bytes to append "len": number of bytes of Val to use

Append_Unichar

function Append_Unichar 
(Self: Gstring;
Wc: Gunichar) return Gstring;

Append_Uri_Escaped

function Append_Uri_Escaped 
(Self: Gstring;
Unescaped: UTF8_String;
Reserved_Chars_Allowed: UTF8_String;
Allow_Utf8: Boolean) return Gstring;
Appends Unescaped to String, escaped any characters that are reserved in URIs using URI-style escape sequences. Since: gtk+ 2.16 "unescaped": a string "reserved_chars_allowed": a string of reserved characters allowed to be used, or null "allow_utf8": set True if the escaped string may include UTF8 characters

Ascii_Down

function Ascii_Down 
(Self: Gstring) return Gstring;

Ascii_Up

function Ascii_Up 
(Self: Gstring) return Gstring;

Assign

function Assign 
(Self: Gstring;
Rval: UTF8_String) return Gstring;
Copies the bytes from a string into a Glib.String.Gstring, destroying any previous contents. It is rather like the standard strcpy function, except that you do not have to worry about having enough space to copy the string. "rval": the string to copy into String

Down

function Down 
(Self: Gstring) return Gstring;

Equal

function Equal 
(Self: Gstring;
V2: Gstring) return Boolean;
Compares two strings for equality, returning True if they are equal. For use with GHash_Table. "v2": another Glib.String.Gstring

Erase

function Erase 
(Self: Gstring;
Pos: Gssize;
Len: Gssize) return Gstring;

Free

function Free 
(Self: Gstring;
Free_Segment: Boolean) return UTF8_String;
Frees the memory allocated for the Glib.String.Gstring. If Free_Segment is True it also frees the character data. If it's False, the caller gains ownership of the buffer and must free it after use with g_free. "free_segment": if True, the actual character data is freed as well

Hash

function Hash 
(Self: Gstring) return Guint;

Insert

function Insert 
(Self: Gstring;
Pos: Gssize;
Val: UTF8_String) return Gstring;
Inserts a copy of a string into a Glib.String.Gstring, expanding it if necessary. "pos": the position to insert the copy of the string "val": the string to insert

Insert_C

function Insert_C 
(Self: Gstring;
Pos: Gssize;
C: Gchar) return Gstring;

Insert_Len

function Insert_Len 
(Self: Gstring;
Pos: Gssize;
Val: UTF8_String;
Len: Gssize) return Gstring;
Inserts Len bytes of Val into String at Pos. Because Len is provided, Val may contain embedded nuls and need not be nul-terminated. If Pos is -1, bytes are inserted at the end of the string. Since this function does not stop at nul bytes, it is the caller's responsibility to ensure that Val has at least Len addressable bytes. "pos": position in String where insertion should happen, or -1 for at the end "val": bytes to insert "len": number of bytes of Val to insert

Insert_Unichar

function Insert_Unichar 
(Self: Gstring;
Pos: Gssize;
Wc: Gunichar) return Gstring;

Overwrite

function Overwrite 
(Self: Gstring;
Pos: Gsize;
Val: UTF8_String) return Gstring;
Overwrites part of a string, lengthening it if necessary. Since: gtk+ 2.14 "pos": the position at which to start overwriting "val": the string that will overwrite the String starting at Pos

Overwrite_Len

function Overwrite_Len 
(Self: Gstring;
Pos: Gsize;
Val: UTF8_String;
Len: Gssize) return Gstring;
Overwrites part of a string, lengthening it if necessary. This function will work with embedded nuls. Since: gtk+ 2.14 "pos": the position at which to start overwriting "val": the string that will overwrite the String starting at Pos "len": the number of bytes to write from Val

Prepend

function Prepend 
(Self: Gstring;
Val: UTF8_String) return Gstring;
Adds a string on to the start of a Glib.String.Gstring, expanding it if necessary. "val": the string to prepend on the start of String

Prepend_C

function Prepend_C 
(Self: Gstring;
C: Gchar) return Gstring;

Prepend_Len

function Prepend_Len 
(Self: Gstring;
Val: UTF8_String;
Len: Gssize) return Gstring;
Prepends Len bytes of Val to String. Because Len is provided, Val may contain embedded nuls and need not be nul-terminated. Since this function does not stop at nul bytes, it is the caller's responsibility to ensure that Val has at least Len addressable bytes. "val": bytes to prepend "len": number of bytes in Val to prepend

Prepend_Unichar

function Prepend_Unichar 
(Self: Gstring;
Wc: Gunichar) return Gstring;

Set_Size

function Set_Size 
(Self: Gstring;
Len: Gsize) return Gstring;

Truncate

function Truncate 
(Self: Gstring;
Len: Gsize) return Gstring;

Up

function Up 
(Self: Gstring) return Gstring;