A bunch of mismatched but useful functions. More...
| Functions | |
| std::string | MakeLower (const std::string &str) | 
| Converts a string to lowercase. | |
| std::string | StripFirstLine (const std::string &str) | 
| Removes the first line from a string. | |
| std::string | StripPadding (const std::string &str) | 
| Removes leading and trailing spaces, tabs, and line breaks. | |
| bool | LoadStringList (std::vector< std::string > &outList, const MPMA::Filename &file) | 
| Load a list of strings from the lines of a file. | |
| std::string | ReadFile (const MPMA::Filename &fname) | 
| Reads a text file into a string. | |
| nuint | CountBits (nuint data) | 
| Counts the number of bits set to 1. | |
| int | GetHighestBit (nuint data) | 
| Determines the highest bit number thats set, or -1 if none. | |
| void | ExplodeString (const std::string &inData, std::vector< std::string > &outData, const std::string &inDeliminators=" \t\n") | 
| Breaks a string, seperated by any number of deliminators, into a list of strings. | |
| nuint | ParseHexString (const std::string &s) | 
| Gets the int value out of a C-style hexadecimal string (assumes no whitespace or bad characters). | |
| bool | StartsWith (const std::string &haystack, const std::string &needle) | 
| Returns whether a string starts with another string. | |
| bool | EndsWith (const std::string &haystack, const std::string &needle) | 
| Returns whether a string ends with another string. | |
| bool | Contains (const std::string &haystack, const std::string &needle) | 
| Returns whether a string contains another string. | |
| int | IndexOf (const std::string &haystack, const std::string &needle, int startIndex=0) | 
| Returns the index of the start of the first occurance of one string within another string starting at startIndex, or -1 if not found. | |
A bunch of mismatched but useful functions.
 1.7.1
 1.7.1