Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for codePointAt (0.21 sec)

  1. android/guava/src/com/google/common/escape/UnicodeEscaper.java

        }
        return new String(dest, 0, destIndex);
      }
    
      /**
       * Returns the Unicode code point of the character at the given index.
       *
       * <p>Unlike {@link Character#codePointAt(CharSequence, int)} or {@link String#codePointAt(int)}
       * this method will never fail silently when encountering an invalid surrogate pair.
       *
       * <p>The behaviour of this method is as follows:
       *
       * <ol>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

      unicodeAllowed: Boolean,
      charset: Charset?,
    ) {
      var encodedCharBuffer: Buffer? = null // Lazily allocated.
      var codePoint: Int
      var i = pos
      while (i < limit) {
        codePoint = input.codePointAt(i)
        if (alreadyEncoded && (
            codePoint == '\t'.code || codePoint == '\n'.code ||
              codePoint == '\u000c'.code || codePoint == '\r'.code
          )
        ) {
          // Skip this character.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        // Ordinarily we'd use something like i += Character.charCount(string.codePointAt(i)) here. But
        // we can get away with i++ because the whole point of this method is to return false if we find
        // a code point that doesn't fit in a char.
        for (int i = 0; i < string.length(); i++) {
          if (string.codePointAt(i) > 0xffff) {
            return false;
          }
        }
        return true;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        // Ordinarily we'd use something like i += Character.charCount(string.codePointAt(i)) here. But
        // we can get away with i++ because the whole point of this method is to return false if we find
        // a code point that doesn't fit in a char.
        for (int i = 0; i < string.length(); i++) {
          if (string.codePointAt(i) > 0xffff) {
            return false;
          }
        }
        return true;
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

            };
        assertEquals("\0HELLO \uD800\uDC00 WORLD!\n", e.escape("\0HeLLo \uD800\uDC00 WorlD!\n"));
      }
    
      public void testCodePointAt_IndexOutOfBoundsException() {
        try {
          UnicodeEscaper.codePointAt("Testing...", 4, 2);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
      }
    
      private static String escapeAsString(Escaper e, String s) {
        return e.escape(s);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

              buffer |= charToThreeUtf8Bytes(c) << shift;
              shift += 24;
              len += 3;
            } else {
              int codePoint = Character.codePointAt(input, i);
              if (codePoint == c) {
                // not a valid code point; let the JDK handle invalid Unicode
                return hashBytes(input.toString().getBytes(charset));
              }
              i++;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/query/QueryCommand.java

                return QueryBuilders.matchPhraseQuery(f, text);
            }
    
            final UnicodeBlock block = UnicodeBlock.of(text.codePointAt(0));
            if (block == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS //
                    || block == UnicodeBlock.HIRAGANA //
                    || block == UnicodeBlock.KATAKANA //
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

            };
        assertEquals("\0HELLO \uD800\uDC00 WORLD!\n", e.escape("\0HeLLo \uD800\uDC00 WorlD!\n"));
      }
    
      public void testCodePointAt_IndexOutOfBoundsException() {
        try {
          UnicodeEscaper.codePointAt("Testing...", 4, 2);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
      }
    
      private static String escapeAsString(Escaper e, String s) {
        return e.escape(s);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  9. guava/src/com/google/common/base/Utf8.java

            utf8Length += 2;
            // jdk7+: if (Character.isSurrogate(c)) {
            if (MIN_SURROGATE <= c && c <= MAX_SURROGATE) {
              // Check that we have a well-formed surrogate pair.
              if (Character.codePointAt(sequence, i) == c) {
                throw new IllegalArgumentException(unpairedSurrogateMsg(i));
              }
              i++;
            }
          }
        }
        return utf8Length;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Utf8.java

            utf8Length += 2;
            // jdk7+: if (Character.isSurrogate(c)) {
            if (MIN_SURROGATE <= c && c <= MAX_SURROGATE) {
              // Check that we have a well-formed surrogate pair.
              if (Character.codePointAt(sequence, i) == c) {
                throw new IllegalArgumentException(unpairedSurrogateMsg(i));
              }
              i++;
            }
          }
        }
        return utf8Length;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
Back to top