galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
StringUtils.hpp File Reference
#include <string_view>
#include <string>
#include <vector>
+ Include dependency graph for StringUtils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  galaxy
 Timer.hpp galaxy.
 
namespace  galaxy::strutils
 

Functions

std::vector< std::string > galaxy::strutils::split (std::string_view input, std::string_view delim) noexcept
 Split a string based on a delimiter.
 
void galaxy::strutils::replace_first (std::string &input, std::string_view to_replace, std::string_view replace_with) noexcept
 Replace first occurrence of a string.
 
void galaxy::strutils::replace_all (std::string &input, std::string_view to_replace, std::string_view replace_with) noexcept
 Replaces all occurrences of a string.
 
bool galaxy::strutils::begins_with (const std::string &input, const std::string &find) noexcept
 Check if string begins with another string.
 
void galaxy::strutils::rtrim (std::string &input) noexcept
 Trim string from start.
 
void galaxy::strutils::ltrim (std::string &input) noexcept
 Trim string from end.
 
void galaxy::strutils::trim (std::string &input) noexcept
 Trim both ends of string.
 
void galaxy::strutils::make_single_spaced (std::string &input) noexcept
 Make a string single spaced.