private static int indexOfUnicodeChar(String input) {
        for (int i = 0; i < input.length(); i++) {
            int c = input.charAt(i);
            if (c > 0x7F) {
                return i;
            }
        }

        return -1;
    }
Finds first occurrence of unicode character and returns its index or {@code -1} otherwise.
exts/jphp-json-ext/src/main/java/org/develnext/jphp/json/gson/MemorySerializer.java