• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

GNativeString Class Reference

General purpose character string. More...

#include <GString.h>

Inheritance diagram for GNativeString:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 GNativeString (const double number)
 GNativeString (const int number)
 GNativeString (const GNativeString &fmt, va_list &args)
 GNativeString (const GBaseString &gs, int from, int len)
 GNativeString (const GNativeString &str)
 GNativeString (const GBaseString &str)
 GNativeString (const GP< GStringRep > &str)
 GNativeString (const unsigned long *dat, unsigned int len)
 GNativeString (const unsigned short *dat, unsigned int len)
 GNativeString (const char *dat, unsigned int len)
 GNativeString (const unsigned long *str)
 GNativeString (const unsigned short *str)
 GNativeString (const unsigned char *str)
 GNativeString (const char *str)
 GNativeString (const char dat)
 GNativeString (void)
 ~GNativeString ()

Detailed Description

General purpose character string.

Each instance of class GNativeString# represents a character string. Overloaded operators provide a value semantic to GNativeString# objects. Conversion operators and constructors transparently convert between GNativeString# objects and const char*# pointers.

Functions taking strings as arguments should declare their arguments as "#const char*#". Such functions will work equally well with GNativeString# objects since there is a fast conversion operator from GNativeString# to "#const char*#". Functions returning strings should return GUTF8String# or GNativeString# objects because the class will automatically manage the necessary memory.

Characters in the string can be identified by their position. The first character of a string is numbered zero. Negative positions represent characters relative to the end of the string (i.e. position #-1# accesses the last character of the string, position #-2# represents the second last character, etc.)

Definition at line 938 of file GString.h.


Constructor & Destructor Documentation

GNativeString::~GNativeString (  ) 

Definition at line 113 of file GString.cpp.

GNativeString::GNativeString ( void   )  [inline]

Null constructor.

Constructs an empty string.

Definition at line 1450 of file GString.h.

GNativeString::GNativeString ( const char  dat  )  [inline]

Constructs a string from a character.

Definition at line 1464 of file GString.h.

GNativeString::GNativeString ( const char *  str  )  [inline]

Constructs a string from a null terminated character array.

Definition at line 1468 of file GString.h.

GNativeString::GNativeString ( const unsigned char *  str  )  [inline]

Constructs a string from a null terminated character array.

Definition at line 1472 of file GString.h.

GNativeString::GNativeString ( const unsigned short *  str  )  [inline]

Definition at line 1476 of file GString.h.

GNativeString::GNativeString ( const unsigned long *  str  )  [inline]

Definition at line 1480 of file GString.h.

GNativeString::GNativeString ( const char *  dat,
unsigned int  len 
) [inline]

Constructs a string from a character array.

Elements of the character array dat# are added into the string until the string length reaches len# or until encountering a null character (whichever comes first).

Definition at line 1484 of file GString.h.

GNativeString::GNativeString ( const unsigned short *  dat,
unsigned int  len 
) [inline]

Definition at line 1488 of file GString.h.

GNativeString::GNativeString ( const unsigned long *  dat,
unsigned int  len 
) [inline]

Definition at line 1492 of file GString.h.

GNativeString::GNativeString ( const GP< GStringRep > &  str  )  [inline]

Construct from base class.

Definition at line 1460 of file GString.h.

GNativeString::GNativeString ( const GBaseString &  str  ) 

GNativeString::GNativeString ( const GNativeString &  str  )  [inline]

Definition at line 1496 of file GString.h.

GNativeString::GNativeString ( const GBaseString &  gs,
int  from,
int  len 
)

Constructs a string from a character array.

Elements of the character array dat# are added into the string until the string length reaches len# or until encountering a null character (whichever comes first).

GNativeString::GNativeString ( const GNativeString &  fmt,
va_list &  args 
) [inline]

Constructs a string with a formatted string (as in vprintf#).

The string is re-initialized with the characters generated according to the specified format fmt# and using the optional arguments. See the ANSI-C function vprintf()# for more information. The current implementation will cause a segmentation violation if the resulting string is longer than 32768 characters.

Definition at line 1508 of file GString.h.

GNativeString::GNativeString ( const int  number  )  [inline]

Constructs a string with a human-readable representation of integer number#.

The format is similar to format #"%d"# in function printf#.

Definition at line 1500 of file GString.h.

GNativeString::GNativeString ( const double  number  )  [inline]

Constructs a string with a human-readable representation of floating point number number#.

The format is similar to format #"%f"# in function printf#.

Definition at line 1504 of file GString.h.


The documentation for this class was generated from the following files:
  • GString.h
  • GString.cpp

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal