mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-07-08 01:30:39 +08:00
Add str_startswith
This commit is contained in:
@@ -60,6 +60,13 @@ namespace str_util {
|
||||
* @return true if input ends with pattern
|
||||
*/
|
||||
bool str_endswith(std::string input, std::string pattern);
|
||||
/**
|
||||
* @brief Check if a string starts with a pattern
|
||||
* @param input Input data
|
||||
* @param pattern Pattern
|
||||
* @return true if input starts with pattern
|
||||
*/
|
||||
bool str_startswith(std::string input, std::string pattern);
|
||||
/**
|
||||
* @brief Trim a string
|
||||
* @param input Input string
|
||||
|
||||
Reference in New Issue
Block a user