added types
parent
c1f2595478
commit
20dd00fad3
@ -0,0 +1,14 @@
|
||||
|
||||
#ifndef GODOTHUB_STRING_UTILS_H
|
||||
#define GODOTHUB_STRING_UTILS_H
|
||||
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
namespace cb::string {
|
||||
bool starts_with(std::string_view content, std::string_view begins_with);
|
||||
bool ends_with(std::string_view content, std::string_view ends_with);
|
||||
}
|
||||
|
||||
#endif //GODOTHUB_STRING_UTILS_H
|
||||
@ -0,0 +1,12 @@
|
||||
#include "cb/string_utils/string_utils.h"
|
||||
|
||||
|
||||
namespace cb {
|
||||
bool string::starts_with(std::string_view content, std::string_view begins_with) {
|
||||
return content.find(begins_with) != std::string::npos;
|
||||
}
|
||||
|
||||
bool string::ends_with(std::string_view content, std::string_view ends_with) {
|
||||
return content.find(ends_with) != std::string::npos;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue