lua console library
This commit is contained in:
@@ -151,7 +151,7 @@ std::wstring util::str2wstr_utf8(const std::string s) {
|
||||
return std::wstring(chars.data(), chars.size());
|
||||
}
|
||||
|
||||
bool util::is_integer(std::string text) {
|
||||
bool util::is_integer(const std::string& text) {
|
||||
for (char c : text) {
|
||||
if (c < '0' || c > '9')
|
||||
return false;
|
||||
@@ -159,7 +159,7 @@ bool util::is_integer(std::string text) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool util::is_integer(std::wstring text) {
|
||||
bool util::is_integer(const std::wstring& text) {
|
||||
for (wchar_t c : text) {
|
||||
if (c < L'0' || c > L'9')
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user