Blamite Game Engine - Blam (Core)
string.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
10 #define str_tolower(str) Blam::Utils::String::to_lower(str);
11 #define str_toupper(str) Blam::Utils::String::to_upper(str);
12 
13 namespace Blam
14 {
15  namespace Utils
16  {
20  namespace String
21  {
31  BLAM bool StartsWith(std::string string, std::string starts_with, bool case_insensetive);
32 
42  BLAM bool EndsWith(std::string string, std::string ends_with, bool case_insensetive);
43 
53  BLAM std::string Replace(std::string orig, std::string to_replace, std::string replace_with);
54 
62  BLAM std::string ToLower(std::string string);
63 
71  BLAM std::string ToUpper(std::string string);
72 
80  BLAM std::string FixDirectorySeparators(std::string string);
81 
98  BLAM std::vector<std::string> Split(std::string string, std::string splitter);
99 
108  BLAM bool ContainsChar(std::string string, char contains);
109 
123  BLAM bool MemoryStringCompare(char* address, char* to_compare, int size);
124  }
125  }
126 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:17
Blam::Utils::String::MemoryStringCompare
BLAM bool 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...
Definition: string.cpp:132
Blam::Utils::String::Replace
BLAM std::string Replace(std::string orig, std::string to_replace, std::string replace_with)
Replaces part of a string with another string.
Definition: string.cpp:67
Blam::Utils::String::Split
BLAM std::vector< std::string > Split(std::string string, std::string splitter)
Splits a string around any instance of a substring.
Definition: string.cpp:87
Blam::Utils::String::ToUpper
BLAM std::string ToUpper(std::string string)
Transforms a string to all-uppercase.
Definition: string.cpp:58
Blam::Utils::String::ToLower
BLAM std::string ToLower(std::string string)
Transforms a string to all-lowercase.
Definition: string.cpp:49
Blam::Utils::String::ContainsChar
BLAM bool ContainsChar(std::string string, char contains)
Determines whether or not a string contains the specified character.
Definition: string.cpp:116
BLAM
#define BLAM
Definition: string.h:7
Blam::Utils::String::EndsWith
BLAM bool EndsWith(std::string string, std::string ends_with, bool case_insensetive)
Determines whether or not a string ends with another string, case-sensetive.
Definition: string.cpp:24
Blam::Utils::String::StartsWith
BLAM bool StartsWith(std::string string, std::string starts_with, bool case_insensetive)
Determines whether or not a string starts with another string, case-insensetive.
Definition: string.cpp:6
Blam::Utils::String::FixDirectorySeparators
BLAM std::string FixDirectorySeparators(std::string string)
Replaces any instance of \\\ in a string with /.
Definition: string.cpp:107
BlamScript::Globals::String
@ String
Represents a std::string.
Definition: haloscript.h:86