Elaztek Developer Hub
Blamite Game Engine - Strings  00430.01.19.25.2136.blamite
A library containing general purpose utilities and classes for use in multiple projects.
string.h File Reference
#include <string>
#include <vector>
+ Include dependency graph for string.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 BlamStrings
 Namespace containing general-purpose utilities.
 
 BlamStrings::Utils
 
 BlamStrings::Utils::String
 Utilities for working with and modifying strings.
 

Macros

#define STRINGS_API   __declspec(dllimport)
 
#define str_tolower(str)   BlamStrings::Utils::String::ToLower(str)
 Macro to more easily convert strings to lowercase. More...
 
#define str_toupper(str)   BlamStrings::Utils::String::ToUpper(str)
 Macro to more easily convert strings to uppercase. More...
 
#define str_replace(str, to, from)   BlamStrings::Utils::String::Replace(str, to, from)
 Macro to more easily replace strings/chars within a given string. More...
 
#define str_contains(str, contains)   BlamStrings::Utils::String::Contains(str, contains)
 Macro to check if a string contains a given substring. More...
 
#define str_contains(str, contains, ignore_case)   BlamStrings::Utils::String::Contains(str, contains, ignore_case)
 Macro to check if a string contains a given substring. More...
 

Functions

STRINGS_API bool BlamStrings::Utils::String::StartsWith (std::string string, std::string starts_with, bool case_insensetive=false)
 Determines whether or not a string starts with another string, case-insensetive. More...
 
STRINGS_API bool BlamStrings::Utils::String::StartsWithAny (std::string string, std::vector< std::string > starts_with, bool case_insensetive=false)
 Determines whether or not a string starts with any one of multiple possible strings. More...
 
STRINGS_API bool BlamStrings::Utils::String::EndsWith (std::string string, std::string ends_with, bool case_insensetive=false)
 Determines whether or not a string ends with another string, case-sensetive. More...
 
STRINGS_API bool BlamStrings::Utils::String::EndsWithAny (std::string string, std::vector< std::string > ends_with, bool case_insensetive=false)
 Determines whether or not a string ends with any one of multiple possible strings. More...
 
STRINGS_API std::string BlamStrings::Utils::String::Replace (std::string orig, std::string to_replace, std::string replace_with)
 Replaces part of a string with another string. More...
 
STRINGS_API std::string BlamStrings::Utils::String::Replace (std::string orig, char to_replace, char replace_with)
 Replaces all instances of a specific character with another charater in a string. More...
 
STRINGS_API std::string BlamStrings::Utils::String::ToLower (std::string string)
 Transforms a string to all-lowercase. More...
 
STRINGS_API std::string BlamStrings::Utils::String::ToUpper (std::string string)
 Transforms a string to all-uppercase. More...
 
STRINGS_API std::string BlamStrings::Utils::String::FixDirectorySeparators (std::string string)
 Replaces any instance of \\ in a string with /. More...
 
STRINGS_API std::vector< std::string > BlamStrings::Utils::String::Split (std::string string, std::string splitter)
 Splits a string around any instance of a substring. More...
 
STRINGS_API bool BlamStrings::Utils::String::ContainsChar (std::string string, char contains)
 Determines whether or not a string contains the specified character. More...
 
STRINGS_API bool BlamStrings::Utils::String::Contains (std::string string, std::string contains, bool ignore_case=false)
 Determines whether or not a string contains the specified substring. More...
 
STRINGS_API bool BlamStrings::Utils::String::MemoryStringCompare (char *address, char *to_compare, int size)
 Checks the specified address in memory to see if it matches a given string, ignoring null terminators. More...
 
STRINGS_API std::string BlamStrings::Utils::String::FormatStringForTagFieldID (std::string original_string)
 Reformats a standard display name string to be appropriate for a field ID. More...
 
STRINGS_API std::string BlamStrings::Utils::String::FormatDecorativeHeaderComment (std::vector< std::string > lines)
 Generates a decorative header comment in the style used in some Blamite header/source files. More...
 
STRINGS_API std::string BlamStrings::Utils::String::Capitalize (std::string original_string, bool remove_spaces=false)
 Capitalizes the first character within each word within a string. More...
 
STRINGS_API std::string BlamStrings::Utils::String::BuildFromList (std::vector< std::string > list, std::string splitter=",")
 Creates a separated list from a list of strings. More...
 
STRINGS_API std::string BlamStrings::Utils::String::ParseStringFromXMLValue (std::string string)
 Performs a number of modifications and tweaks to a string. More...
 
STRINGS_API std::string BlamStrings::Utils::String::FormatStringForXML (std::string string, std::string prefix="")
 Formats a string to be XML safe/friendly. More...
 

Macro Definition Documentation

◆ str_contains [1/2]

#define str_contains (   str,
  contains 
)    BlamStrings::Utils::String::Contains(str, contains)

Macro to check if a string contains a given substring.

For additional information, see BlamStrings::Utils::String::Contains()

Parameters
str- The string to search through.
contains- The string or character to search for.
Returns
true if the provided string contains the searched string, otherwise returns false.

For additional information, see BlamStrings::Utils::String::Contains()

Parameters
str- The string to search through.
contains- The string or character to search for.
ignore_case- Whether or not to ignore case sensitivity.
Returns
true if the provided string contains the searched string, otherwise returns false.

◆ str_contains [2/2]

#define str_contains (   str,
  contains,
  ignore_case 
)    BlamStrings::Utils::String::Contains(str, contains, ignore_case)

Macro to check if a string contains a given substring.

For additional information, see BlamStrings::Utils::String::Contains()

Parameters
str- The string to search through.
contains- The string or character to search for.
Returns
true if the provided string contains the searched string, otherwise returns false.

For additional information, see BlamStrings::Utils::String::Contains()

Parameters
str- The string to search through.
contains- The string or character to search for.
ignore_case- Whether or not to ignore case sensitivity.
Returns
true if the provided string contains the searched string, otherwise returns false.

◆ str_replace

#define str_replace (   str,
  to,
  from 
)    BlamStrings::Utils::String::Replace(str, to, from)

Macro to more easily replace strings/chars within a given string.

For additional information, see BlamStrings::Utils::String::Replace()

Parameters
str- The string to search through.
to- The string or character to search for.
from- The string or character to replace any occurrences of to with.
Returns
A copy of the provided string, with all occurrences of to replaced with from.

◆ str_tolower

#define str_tolower (   str)    BlamStrings::Utils::String::ToLower(str)

Macro to more easily convert strings to lowercase.

For additional information, see BlamStrings::Utils::String::ToLower()

Parameters
str- The string to make lowercase.
Returns
The input string, converted to lowercase.

◆ str_toupper

#define str_toupper (   str)    BlamStrings::Utils::String::ToUpper(str)

Macro to more easily convert strings to uppercase.

For additional information, see BlamStrings::Utils::String::ToUpper()

Parameters
str- The string to make uppercase.
Returns
The input string, converted to uppercase.

◆ STRINGS_API

#define STRINGS_API   __declspec(dllimport)