mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
dd0a8a17b2
- started documenting the files I glossed over, some are totally done, others are just partially done - I changed the decompiler to automatically initialize the art-group-info from the json file. This makes updating gsrc, even a single file at a time, have consistent naming - Though I disabled this functionality for jak 1, as I have no idea if using the ntsc art groups will cause a regression for different versions - fix indentation for docstrings -- it still doesn't look great, but this is now a formatting concern, rather than the docstring having a bunch of happen-stance leading whitespace.
23 lines
973 B
C++
23 lines
973 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace str_util {
|
|
bool contains(const std::string& s, const std::string& substr);
|
|
bool starts_with(const std::string& s, const std::string& prefix);
|
|
bool ends_with(const std::string& s, const std::string& prefix);
|
|
std::string ltrim(const std::string& s);
|
|
std::string rtrim(const std::string& s);
|
|
std::string trim(const std::string& s);
|
|
/// Given a string with new-lines, split and trim the leading whitespace from each line
|
|
/// then return the string with the new-lines back in place.
|
|
std::string trim_newline_indents(const std::string& s);
|
|
int line_count(const std::string& str);
|
|
bool valid_regex(const std::string& regex);
|
|
std::string diff(const std::string& lhs, const std::string& rhs);
|
|
/// Default splits on \n characters
|
|
std::vector<std::string> split(const ::std::string& str, char delimiter = '\n');
|
|
std::string join(const std::vector<std::string>& strs, const std::string& join_with);
|
|
} // namespace str_util
|