BurgerLib
Namespaces | Enumerations | Functions | Variables
brmisc.h File Reference
#include "brtypes.h"
#include "mmmemory.h"
#include "brglobalmemorymanager.h"
Include dependency graph for brmisc.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  Burger

Enumerations

enum  { Burger::LEADINGZEROS = 0x8000, Burger::NOENDINGNULL = 0x4000 }

Functions

Word32 BURGER_API Burger::BCDToWord (Word32 uInput)
 Convert a BCD value into a decimal integer.
Word32 BURGER_API Burger::WordToBCD (Word32 uInput)
 Convert a decimal integer into BCD format.
Word32 BURGER_API Burger::PowerOf2 (Word32 uInput)
 Round up an integer to the nearest power of 2.
void BURGER_API Burger::CStringToPString (Word8 *pOutput, const char *pInput)
 Convert a "C" string into a Pascal string.
void BURGER_API Burger::PStringToCString (char *pOutput, const Word8 *pInput)
 Convert a Pascal string into a "C" string.
char *BURGER_API Burger::ParseBeyondWhiteSpace (const char *pInput)
 Parse a "C" string until a non-white space character is found.
char *BURGER_API Burger::ParseToDelimiter (const char *pInput)
 Return a pointer to whitespace, CR, LF or zero.
char *BURGER_API Burger::ParseBeyondEOL (const char *pInput)
 Parse a "C" string until a zero or EOL.
char *BURGER_API Burger::ParseQuotedString (char *pOutput, WordPtr uOutputSize, const char *pInput)
 Parse out a quoted string.
Word BURGER_API Burger::Wildcardcmp (const char *pInput, const char *pWildcard)
 Perform a string comparison using the wildcard system.
WordPtr BURGER_API Burger::CopyUpToEOL (char *pOutput, WordPtr uOutputSize, const char *pInput, WordPtr uInputSize)
 Read a stream of text chars until a NULL, LF, CR or CR/LF is found.
void BURGER_API Burger::StripLeadingSpaces (char *pInput)
 Remove spaces from the beginning of a string.
void BURGER_API Burger::StripTrailingSpaces (char *pInput)
 Remove spaces from the end of a string.
void BURGER_API Burger::StripLeadingWhiteSpace (char *pInput)
 Remove whitespace from the beginning of a string.
void BURGER_API Burger::StripTrailingWhiteSpace (char *pInput)
 Remove whitespace from the end of a string.
void BURGER_API Burger::StripLeadingAndTrailingSpaces (char *pInput)
 Remove spaces from the beginning and end of a string.
void BURGER_API Burger::StripLeadingAndTrailingWhiteSpace (char *pInput)
 Remove whitespace from the beginning and end of a string.
void BURGER_API Burger::StripAllFromList (char *pInput, const char *pList)
 Remove all characters that match those in a list.
void BURGER_API Burger::StripAllButList (char *pInput, const char *pList)
 Remove all characters except those in a list.
void BURGER_API Burger::StripTrailing (char *pInput, const char *pList)
 Remove characters from the end of a string.
void BURGER_API Burger::StripLeading (char *pInput, const char *pList)
 Remove characters from the beginning of a string.
char *BURGER_API Burger::GetFileExtension (const char *pInput)
 Get a pointer to the beginning of the file extension.
void BURGER_API Burger::SetFileExtension (char *pInput, const char *pNewExtension)
 Replace the text after the last period for filename extensions.
void BURGER_API Burger::RemoveTrailingChar (char *pInput, Word uRemove)
 Remove a character from the end of a string if present.
void BURGER_API Burger::ForceTrailingChar (char *pInput, Word uLast)
 Force a character to be at the end of a string if missing.
void BURGER_API Burger::SlashesToColons (char *pInput)
 Convert all forward and back slashes to colons.
void BURGER_API Burger::SlashesToColons (char *pOutput, const char *pInput)
 Convert all forward and back slashes to colons.
void BURGER_API Burger::SlashesToWin32Slashes (char *pInput)
 Convert all forward slashes ('/') to back slashes ('\').
void BURGER_API Burger::SlashesToWin32Slashes (char *pOutput, const char *pInput)
 Convert all forward slashes ('/') to back slashes ('\').
WordPtr BURGER_API Burger::StringLength (const char *pInput)
 Perform an ANSI compatible strlen().
WordPtr BURGER_API Burger::StringLength (const Word16 *pInput)
 Perform an ANSI compatible strlen() for UTF16 strings..
void BURGER_API Burger::StringCopy (char *pOutput, const char *pInput)
 Copy a "C" string.
void BURGER_API Burger::StringCopy (char *pOutput, WordPtr uOutputSize, const char *pInput)
 Copy a "C" string with bounds checking.
void BURGER_API Burger::StringConcatenate (char *pOutput, const char *pInput)
 Concatenate a "C" string with another "C" string.
void BURGER_API Burger::StringConcatenate (char *pOutput, WordPtr uOutputSize, const char *pInput)
 Concatenate a "C" string with another "C" string bounds checked.
int BURGER_API Burger::StringCompare (const char *pInput1, const char *pInput2)
 Compare two "C" strings for equality.
int BURGER_API Burger::StringCaseCompare (const char *pInput1, const char *pInput2)
 Compare two "C" strings for equality, case insensitive.
int BURGER_API Burger::StringCaseCompare (const char *pInput1, const char *pInput2, WordPtr uMaxLength)
 Compare two "C" strings for equality, case insensitive, length delimited.
void BURGER_API Burger::MemoryCopy (void *pOutput, const void *pInput, WordPtr uCount)
 Copy raw memory from one buffer to another.
void BURGER_API Burger::MemoryMove (void *pOutput, const void *pInput, WordPtr uCount)
 Copy raw memory from one buffer to another in any direction.
void BURGER_API Burger::MemoryClear (void *pOutput, WordPtr uCount)
 Set a buffer to all zeros.
void BURGER_API Burger::MemoryFill (void *pOutput, Word8 uFill, WordPtr uCount)
 Set a buffer to a specific value.
int BURGER_API Burger::MemoryCompare (const void *pInput1, const void *pInput2, WordPtr uCount)
 Compare two byte buffers for equality.
int BURGER_API Burger::MemoryCaseCompare (const void *pInput1, const void *pInput2, WordPtr uCount)
 Compare two byte buffers for equality, case insensitive.
void BURGER_API Burger::StringUppercase (char *pInput)
 Convert a string to upper case.
void BURGER_API Burger::StringUppercase (char *pOutput, const char *pInput)
 Convert a string to upper case into a new buffer.
void BURGER_API Burger::StringLowercase (char *pInput)
 Convert a string to lower case.
void BURGER_API Burger::StringLowercase (char *pOutput, const char *pInput)
 Convert a string to lower case into a new buffer.
char *BURGER_API Burger::StringDuplicate (const char *pInput)
 Make a copy of a "C" string.
char *BURGER_API Burger::StringDuplicate (const char *pInput, WordPtr uPadding)
 Make a copy of a "C" string with some padding.
BURGER_INLINE void BURGER_API Burger::StringDelete (const char *pInput)
 Delete an allocated string.
char *BURGER_API Burger::NumberToAscii (char *pOutput, Word32 uInput, Word uDigits=0)
 Convert an unsigned 32 bit integer into ASCII.
char *BURGER_API Burger::NumberToAscii (char *pOutput, Int32 iInput, Word uDigits=0)
 Convert a signed 32 bit integer into ASCII.
char *BURGER_API Burger::NumberToAscii (char *pOutput, float fInput)
 Convert a 32 bit float into ASCII.
char *BURGER_API Burger::NumberToAscii (char *pOutput, double dInput)
 Convert a 64 bit float into ASCII.
char *BURGER_API Burger::NumberToAsciiHex (char *pOutput, Word32 uInput, Word uDigits=0)
 Convert an unsigned 32 bit integer into hexadecimal ASCII.
Word32 BURGER_API Burger::AsciiToInteger (const char *pInput, const char **pDest=NULL)
 Convert an ASCII string into an integer.
float BURGER_API Burger::AsciiToFloat (const char *pInput, const char **pDest=NULL)
 Convert an ASCII string into a floating point number.
double BURGER_API Burger::AsciiToDouble (const char *pInput, const char **pDest=NULL)
 Convert an ASCII string into a floating point number.

Variables

const char Burger::EmptyString [1] = {0}
 ""
const char Burger::CRLFString [3] = {'\r','\n',0}
 "\r\n"
const char Burger::CRString [2] = {'\r',0}
 "\r"
const char Burger::LFString [2] = {'\n',0}
 "\n"
const char * Burger::WeekDays [7] = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}
 Days of the week.
const char * Burger::Months [12] = {"January","February","March","April","May","June","July","August","September","October","November","December"}
 Months of the year.
const char Burger::NibbleToAsciiUppercase [16]
 Table to convert nibbles (0-15) into upper case ASCII characters.
const char Burger::NibbleToAsciiLowercase [16]
 Table to convert nibbles (0-15) into lower case ASCII characters.
const Word8 Burger::AsciiToWord8Table [256]
 Table to convert ASCII characters into nibbles (0-15).
const Word8 Burger::ReverseBits [256]
 Table to reverse the bit order of a byte.
const Word32 Burger::TensTable32 [10]
 Table used for testing powers of ten for integer to ASCII conversion.