56 size_t idx1 =
data.find(
"###");
57 while (idx1 != std::string::npos)
59 const size_t idx2 =
data.find(
';', idx1);
60 if (idx2 == std::string::npos)
64 data.substr(idx1 + 3, idx2 - idx1 - 3));
65 data.replace(idx1, idx2 - idx1 + 1, str);
67 idx1 =
data.find(
"###");
77 std::string
data = link;
85 if (!link.empty() && link[0] ==
'm')
88 atoi(link.substr(1).c_str()));
93 else if (!link.empty() && link[0] ==
'p')
96 atoi(link.substr(1).c_str()));
101 else if (!link.empty() && link[0] ==
'h')
104 atoi(link.substr(1).c_str()));
109 else if (!link.empty() && link[0] ==
'M')
112 atoi(link.substr(1).c_str()));
117 else if (!link.empty() && link[0] ==
'q')
120 atoi(link.substr(1).c_str()));
124 size_t idx = link.find(
',');
125 if (idx != std::string::npos)
127 const int id = atoi(link.substr(0, idx).c_str());
130 STD_VECTOR<int> parts;
132 link.substr(idx),
',');
142 const int id = atoi(link.c_str());
153 size_t idx1 =
data.find(
"\\t");
154 while (idx1 != std::string::npos)
156 const size_t idx2 =
data.find(
';', idx1);
157 if (idx2 == std::string::npos)
160 const unsigned int newSize =
CAST_U32(
162 idx1 + 2, idx2 - idx1 - 2).c_str()));
163 std::string str =
data.substr(0, idx1);
164 while (str.size() < newSize)
166 str.append(
data.substr(idx2 + 1));
168 idx1 =
data.find(
"\\t");
static ItemColor getColorFromCards(const int *const cards)
const std::string & getName() const
bool info(InputEvent &event)
BeingInfo * get(const BeingTypeId id)
const ItemInfo & get(const int id)
BeingInfo * get(const BeingTypeId id)
BeingInfo * get(const BeingTypeId id)
BeingInfo * get(const BeingTypeId id)
std::string getName(const int id)
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
void splitToIntVector(std::vector< int > &tokens, const std::string &text, const char separator)
bool strStartWith(const std::string &str1, const std::string &str2)