VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
vlStringUtil.h File Reference

This file declares functions and types helpful to developers using DtString. More...

Go to the source code of this file.

Classes

class  DtStringPatternMatch
 Performs pattern matching against user specified DtString using Boyer Moore algorithm. More...
 

Typedefs

typedef std::set< DtStringDtStringSet
 An set of DtStrings. More...
 

Enumerations

enum  DtStringEncodingType {
  HLAvariableArray, HLAfixedArray, HLAnullTerminatedArray, RPRnullTerminatedArray,
  HLAlengthlessVarArray, RPRlengthlessArray, LengthlessArray
}
 

Functions

template<typename T >
std::wstring DtToWString (const T &val)
 This template function takes an instance of any type which has overloaded operator<<(wostream). More...
 
std::wstring DtToWString (const std::string &val)
 This method overloads the DtToWString template above and allows standard strings to be converted to a wide string;. More...
 
std::wstring DtToWString (const char *val)
 This function overloads DtToString to provide conversions for const char *. More...
 
std::wstring DtToWString (char *val)
 This function overloads DtToString to provide conversions for char *. More...
 
std::wstring DtToWString (const DtString &val)
 This function overloads DtToString to provide conversions for DtStrings. More...
 
template<typename T >
std::string DtToString (const T &val)
 This Template method takes a variable of any type which has overloaded operator<<(ostream) and returns a standard string. More...
 
std::string DtToString (const std::wstring &val)
 This function overloads DtToString for standard wide strings. More...
 
std::string DtToString (const wchar_t *val)
 This function overloads DtToString to provide conversions for const wchar_t *. More...
 
DtString DtToLower (const char *)
 This function returns a new lowercase DtString. More...
 
DtString DtToLower (const DtString &)
 This function returns a new lowercase DtString. More...
 
DtString DtToUpper (const char *)
 This function returns a new uppercase DtString. More...
 
DtString DtToUpper (const DtString &)
 This function returns a new uppercase DtString. More...
 
DtString DtFirstCharToLower (const DtString &)
 This function returns a new string with the first character lowercase. More...
 
DtString DtFirstCharToLowerConditional (const DtString &)
 This function returns a new string with the first character lowercase as long as the second character is lowercase as well. More...
 
DtString DtFirstCharToUpper (const DtString &)
 This function returns a new string with the first character uppercase. More...
 
DtString DtReplaceSubstring (const DtString &str, const DtString &searchFor, const DtString &replacement)
 This function will replace the first instance of a substring within a string with another string specified by replacement. More...
 
DtString DtReplaceAllSubstrings (const DtString &str, const DtString &searchFor, const DtString &replacement)
 This function will replace all instances of a substring within a string with another string specified by replacement. More...
 
bool DtContainsSubstring (const DtString &str, const DtString &searchFor)
 This function looks for a substring within str. More...
 
int DtStringToBuffer (DtStringEncodingType encodingType, char *buffer, int bufferSize, const DtString &origin, bool wide=false)
 
int DtStringFromBuffer (DtStringEncodingType encodingType, DtString *result, const char *buffer, int bufferSize, bool wide=false)
 
int DtStringGetNetPadding (DtStringEncodingType encodingType)
 

Variables

int DtVariableArraySizeLength
 

Detailed Description

This file declares functions and types helpful to developers using DtString.

Typedef Documentation

typedef std::set<DtString> DtStringSet

An set of DtStrings.

Enumeration Type Documentation

Enumerator
HLAvariableArray 
HLAfixedArray 
HLAnullTerminatedArray 
RPRnullTerminatedArray 
HLAlengthlessVarArray 
RPRlengthlessArray 
LengthlessArray 

Function Documentation

bool DtContainsSubstring ( const DtString str,
const DtString searchFor 
)

This function looks for a substring within str.

Returns
true if searchFor is within str, false otherwise.
DtString DtFirstCharToLower ( const DtString )

This function returns a new string with the first character lowercase.

DtString DtFirstCharToLowerConditional ( const DtString )

This function returns a new string with the first character lowercase as long as the second character is lowercase as well.

This avoids funny conversions like hLAState.

DtString DtFirstCharToUpper ( const DtString )

This function returns a new string with the first character uppercase.

Referenced by MakeCCompatibleString().

DtString DtReplaceAllSubstrings ( const DtString str,
const DtString searchFor,
const DtString replacement 
)

This function will replace all instances of a substring within a string with another string specified by replacement.

Parameters
strThe string to be searched.
searchForThe substring to be searched for.
replacementThe replacement string for subString.

Referenced by MakeCCompatibleString().

DtString DtReplaceSubstring ( const DtString str,
const DtString searchFor,
const DtString replacement 
)

This function will replace the first instance of a substring within a string with another string specified by replacement.

Parameters
strThe string to be searched.
searchForThe substring to be searched for.
replacementThe replacement string for subString.
int DtStringFromBuffer ( DtStringEncodingType  encodingType,
DtString result,
const char *  buffer,
int  bufferSize,
bool  wide = false 
)
int DtStringGetNetPadding ( DtStringEncodingType  encodingType)
int DtStringToBuffer ( DtStringEncodingType  encodingType,
char *  buffer,
int  bufferSize,
const DtString origin,
bool  wide = false 
)
DtString DtToLower ( const char *  str)
inline

This function returns a new lowercase DtString.

References DtString::toLower().

DtString DtToLower ( const DtString str)
inline

This function returns a new lowercase DtString.

References DtString::toLower().

template<typename T >
std::string DtToString ( const T &  val)
inline

This Template method takes a variable of any type which has overloaded operator<<(ostream) and returns a standard string.

Referenced by DtToString().

std::string DtToString ( const std::wstring &  val)
inline

This function overloads DtToString for standard wide strings.

It returns a standard string, IF there is a conversion possible. This Function will not work for widestrings which actually use more than one byte per character.

References DtToString().

std::string DtToString ( const wchar_t *  val)
inline

This function overloads DtToString to provide conversions for const wchar_t *.

DtString DtToUpper ( const char *  str)
inline

This function returns a new uppercase DtString.

References DtString::toUpper().

DtString DtToUpper ( const DtString str)
inline

This function returns a new uppercase DtString.

References DtString::toUpper().

template<typename T >
std::wstring DtToWString ( const T &  val)
inline

This template function takes an instance of any type which has overloaded operator<<(wostream).

Inline Implementations

It converts that to a standard wide string.

Referenced by DtToWString().

std::wstring DtToWString ( const std::string &  val)
inline

This method overloads the DtToWString template above and allows standard strings to be converted to a wide string;.

std::wstring DtToWString ( const char *  val)
inline

This function overloads DtToString to provide conversions for const char *.

std::wstring DtToWString ( char *  val)
inline

This function overloads DtToString to provide conversions for char *.

std::wstring DtToWString ( const DtString val)
inline

This function overloads DtToString to provide conversions for DtStrings.

References DtString::c_str(), and DtToWString().

Variable Documentation

int DtVariableArraySizeLength

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)