CrystalSpace

Public API Reference

CS::Quote Struct Reference

Helper functions to decorate strings with nice-looking quote characters. More...

#include <csutil/stringquote.h>

List of all members.

Static Public Member Functions

static const char * Double (const char *str)
 Put double quotes (, ) around a string.
static void Double (csStringBase &out, const char *str)
 Put double quotes (, ) around a string.
static const char * DoubleLeft (const char *str="")
 Put a double left quote () before a string.
static void DoubleLeft (csStringBase &out, const char *str="")
 Put a double left quote () before a string.
static const char * DoubleRight (const char *str="")
 Put a double right quote () after a string.
static void DoubleRight (csStringBase &out, const char *str="")
 Put a double right quote () after a string.
static const char * Single (const char *str)
 Put single quotes (, ) around a string.
static void Single (csStringBase &out, const char *str)
 Put single quotes (, ) around a string.
static const char * SingleLeft (const char *str="")
 Put a single left quote () before a string.
static void SingleLeft (csStringBase &out, const char *str="")
 Put a single left quote () before a string.
static const char * SingleRight (const char *str="")
 Put a single right quote () after a string.
static void SingleRight (csStringBase &out, const char *str="")
 Put a single right quote () after a string.

Detailed Description

Helper functions to decorate strings with nice-looking quote characters.

Remarks:
These functions work upon UTF-8 strings. Non-UTF-8 input will likely be mangled.

Definition at line 36 of file stringquote.h.


Member Function Documentation

static const char* CS::Quote::Double ( const char *  str  )  [static]

Put double quotes (, ) around a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::Double ( csStringBase out,
const char *  str 
) [static]

Put double quotes (, ) around a string.

Parameters:
out String to receive quoted input.
str String to quote.
static const char* CS::Quote::DoubleLeft ( const char *  str = ""  )  [static]

Put a double left quote () before a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::DoubleLeft ( csStringBase out,
const char *  str = "" 
) [static]

Put a double left quote () before a string.

Parameters:
out String to receive quoted input.
str String to quote.
static const char* CS::Quote::DoubleRight ( const char *  str = ""  )  [static]

Put a double right quote () after a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::DoubleRight ( csStringBase out,
const char *  str = "" 
) [static]

Put a double right quote () after a string.

Parameters:
out String to receive quoted input.
str String to quote.
static const char* CS::Quote::Single ( const char *  str  )  [static]

Put single quotes (, ) around a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::Single ( csStringBase out,
const char *  str 
) [static]

Put single quotes (, ) around a string.

Parameters:
out String to receive quoted input.
str String to quote.
static const char* CS::Quote::SingleLeft ( const char *  str = ""  )  [static]

Put a single left quote () before a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::SingleLeft ( csStringBase out,
const char *  str = "" 
) [static]

Put a single left quote () before a string.

Parameters:
out String to receive quoted input.
str String to quote.
static const char* CS::Quote::SingleRight ( const char *  str = ""  )  [static]

Put a single right quote () after a string.

Parameters:
str String to quote.
Returns:
Pointer to quoted input. The returned string will be discarded overwritten after a small, but indeterminate time. It is safe to assume it survives to be used as an argument to a function call, but for anything longer than that the string should be stowed away manually somewhere.
static void CS::Quote::SingleRight ( csStringBase out,
const char *  str = "" 
) [static]

Put a single right quote () after a string.

Parameters:
out String to receive quoted input.
str String to quote.

The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1