kjs Library API Documentation

KJS::UCharReference Class Reference

Dynamic reference to a string character. More...

#include <ustring.h>

Collaboration diagram for KJS::UCharReference:

Collaboration graph
[legend]
List of all members.

Public Member Functions

UCharReferenceoperator= (UChar c)
 Set the referenced character to c.

UCharReferenceoperator= (char c)
 Same operator as above except the argument that it takes.

unsigned short unicode () const
unsigned char low () const
unsigned char high () const
UChar toLower () const
UChar toUpper () const

Friends

class UString

Detailed Description

Dynamic reference to a string character.

UCharReference is the dynamic counterpart of UChar. It's used when characters retrieved via index from a UString are used in an assignment expression (and therefore can't be treated as being const):

UString s("hello world"); s[0] = 'H';

If that sounds confusing your best bet is to simply forget about the existance of this class and treat is as being identical to UChar.

Definition at line 121 of file ustring.h.


Member Function Documentation

UCharReference & UCharReference::operator= UChar  c  ) 
 

Set the referenced character to c.

Definition at line 148 of file ustring.cpp.

References KJS::UString::detach(), and KJS::UString::rep.

Referenced by operator=().

UCharReference& KJS::UCharReference::operator= char  c  )  [inline]
 

Same operator as above except the argument that it takes.

Definition at line 132 of file ustring.h.

References operator=().

unsigned short KJS::UCharReference::unicode  )  const [inline]
 

Returns:
Unicode value.

Definition at line 136 of file ustring.h.

References KJS::UChar::unicode().

unsigned char KJS::UCharReference::low  )  const [inline]
 

Returns:
Lower byte.

Definition at line 140 of file ustring.h.

References KJS::UChar::uc.

unsigned char KJS::UCharReference::high  )  const [inline]
 

Returns:
Higher byte.

Definition at line 144 of file ustring.h.

References KJS::UChar::uc.

UChar KJS::UCharReference::toLower  )  const [inline]
 

Returns:
Character converted to lower case.

Definition at line 148 of file ustring.h.

References KJS::UChar::toLower().

UChar KJS::UCharReference::toUpper  )  const [inline]
 

Returns:
Character converted to upper case.

Definition at line 152 of file ustring.h.

References KJS::UChar::toUpper().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:09:36 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001