示例#1
0
	std::vector<lstring> convert_split_words_allow_alphabet(const lstring &lt, const alphabet &allow) {
		lstring copy;
		lstring *ptr = (lstring *)&lt;

		bool changed = false;
		static letter space(' ');
		for (size_t i = 0; i < lt.size(); ++i) {
			if (!allow.ok(lt[i])) {
				if (!changed) {
					copy = lt;
					ptr = &copy;

					changed = true;
				}

				copy[i] = space;
			}
		}

		return convert_split_words(*ptr);
	}