Research portable Memory game | Исследовать портируемую игру Память
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 months ago
5 months ago
5 months ago
12345678910111213141516171819
  1. #include "llm.h"
  2. bool llm_isDigit(const std::string &str) {
  3. return
  4. !str.empty() &&
  5. str.find_first_not_of("0123456789") == std::string::npos;
  6. }
  7. bool llm_startsWith(
  8. const std::string &str,
  9. const std::string &prefix
  10. ) {
  11. // https://stackoverflow.com/a/40441240
  12. return str.rfind(prefix, 0) == 0;
  13. }
  14. int llm_strToInt(const std::string &str) {
  15. return std::stoi(str);
  16. }