コード例 #1
0
ファイル: ofxEditorSettings.cpp プロジェクト: DEM0915/dix
//--------------------------------------------------------------
void ofxEditorSettings::setMatchingChars(u32string openChars, u32string closeChars) {
	if(openChars.length() == 0 || closeChars.length() == 0) {
		ofLogWarning("ofxEditorSettings") << "empty open or close char string";
		return;
	}
	openChars = openChars;
	closeChars = closeChars;
}
コード例 #2
0
//--------------------------------------------------------------
void ofxEditorSyntax::setPunctuationChars(const u32string &chars) {
	if(chars.length() == 0) {
		ofLogWarning("ofxEditorSyntax") << "empty punctuation string";
		return;
	}
	punctuationChars = chars;
}
コード例 #3
0
//--------------------------------------------------------------
void ofxEditorSyntax::setOperatorChars(const u32string &chars) {
	if(chars.length() == 0) {
		ofLogWarning("ofxEditorSyntax") << "empty operator string";
		return;
	}
	operatorChars = chars;
}
コード例 #4
0
ファイル: EmojiBase32.cpp プロジェクト: Jenuce/ZRTPCPP
shared_ptr<string> EmojiBase32::u32StringToUtf8(const u32string& in)
{
    shared_ptr<string> result = make_shared<string>();

    string out(6, '\0');
    for (size_t n = 0; n < in.size(); ++n) {
        size_t offset = 0;
        U8_APPEND_UNSAFE(&out[0], offset, in[n]);
        result->append(out, 0, offset);
    }
    return result;
}
コード例 #5
0
ファイル: StringAdditions.cpp プロジェクト: jomanto/le2
string convertUtf32ToUtf8String(const u32string& utf32string)
{
  string result;
  utf8::utf32to8(utf32string.begin(), utf32string.begin(), back_inserter(result));
  return result;
}