ppsspp/base/stringutil.h

18 lines
319 B
C
Raw Normal View History

2012-03-24 23:39:19 +01:00
#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <string>
class ITOA {
public:
char buffer[16];
const char *p(int i) {
sprintf(buffer, "%i", i);
return &buffer[0];
}
};
inline bool endsWith(const std::string &str, const std::string &what) {
return str.substr(str.size() - what.size()) == what;
}