INNER CODE UNIT · C

textUTF

Qfusion/qfusion · source/android/android_input.c:555

	textUTF = ( *env )->GetStringUTFChars( env, textJS, NULL );
	if( str ) {
		Q_strncpyz( str, textUTF, strSize );
		Q_FixTruncatedUtf8( str );
		len = strlen( str );
		cursorStr = str;
	} else {
		len = strlen( textUTF );
		cursorStr = textUTF;
	}

	if( cursorPos ) {
		int cursor = ( *env )->CallIntMethod( env, sys_android_app->activity->clazz, getComposingCursor );
		const char *oldCursorStr = cursorStr;
		while( ( cursor > 0 ) && *cursorStr ) {
			cursor--;
			cursorStr += Q_Utf8SyncPos( cursorStr, 1, UTF8SYNC_RIGHT );
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…