Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for UTF8 (0.15 sec)

  1. guava-tests/test/com/google/common/base/Utf8Test.java

        ILL_FORMED_STRINGS = builder.build();
      }
    
      public void testEncodedLength_validStrings() {
        assertEquals(0, Utf8.encodedLength(""));
        assertEquals(11, Utf8.encodedLength("Hello world"));
        assertEquals(8, Utf8.encodedLength("Résumé"));
        assertEquals(
            461,
            Utf8.encodedLength(
                "威廉·莎士比亞(William Shakespeare,"
                    + "1564年4月26號—1616年4月23號[1])係隻英國嗰演員、劇作家同詩人,"
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    // It returns -1 if rune is not present in s.
    // If r is utf8.RuneError, it returns the first instance of any
    // invalid UTF-8 byte sequence.
    func IndexRune(s []byte, r rune) int {
    	switch {
    	case 0 <= r && r < utf8.RuneSelf:
    		return IndexByte(s, byte(r))
    	case r == utf8.RuneError:
    		for i := 0; i < len(s); {
    			r1, n := utf8.DecodeRune(s[i:])
    			if r1 == utf8.RuneError {
    				return i
    			}
    			i += n
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

      }
    
      fun writeObjectIdentifier(s: String) {
        val utf8 = Buffer().writeUtf8(s)
        val v1 = utf8.readDecimalLong()
        require(utf8.readByte() == '.'.code.toByte())
        val v2 = utf8.readDecimalLong()
        writeVariableLengthLong(v1 * 40 + v2)
    
        while (!utf8.exhausted()) {
          require(utf8.readByte() == '.'.code.toByte())
          val vN = utf8.readDecimalLong()
          writeVariableLengthLong(vN)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

            HOST,
            KEEP_ALIVE,
            PROXY_CONNECTION,
            TE,
            TRANSFER_ENCODING,
            ENCODING,
            UPGRADE,
            TARGET_METHOD_UTF8,
            TARGET_PATH_UTF8,
            TARGET_SCHEME_UTF8,
            TARGET_AUTHORITY_UTF8,
          )
        private val HTTP_2_SKIPPED_RESPONSE_HEADERS =
          immutableListOf(
            CONNECTION,
            HOST,
            KEEP_ALIVE,
            PROXY_CONNECTION,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Header.kt

      override fun toString(): String = "${name.utf8()}: ${value.utf8()}"
    
      companion object {
        // Special header names defined in HTTP/2 spec.
        @JvmField val PSEUDO_PREFIX: ByteString = ":".encodeUtf8()
    
        const val RESPONSE_STATUS_UTF8 = ":status"
        const val TARGET_METHOD_UTF8 = ":method"
        const val TARGET_PATH_UTF8 = ":path"
        const val TARGET_SCHEME_UTF8 = ":scheme"
        const val TARGET_AUTHORITY_UTF8 = ":authority"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  6. docs_src/security/tutorial007_an.py

    ):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/Utf8Test.java

        ILL_FORMED_STRINGS = builder.build();
      }
    
      public void testEncodedLength_validStrings() {
        assertEquals(0, Utf8.encodedLength(""));
        assertEquals(11, Utf8.encodedLength("Hello world"));
        assertEquals(8, Utf8.encodedLength("Résumé"));
        assertEquals(
            461,
            Utf8.encodedLength(
                "威廉·莎士比亞(William Shakespeare,"
                    + "1564年4月26號—1616年4月23號[1])係隻英國嗰演員、劇作家同詩人,"
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/io/FileUtil.java

            }
        }
    
        /**
         * UTF8でファイルからテキストを読み込みます。
         *
         * @param path
         *            パス。{@literal null}や空文字列であってはいけません
         * @return 読み込んだテキスト
         */
        public static String readUTF8(final String path) {
            assertArgumentNotEmpty("path", path);
            return readText(path, UTF8);
        }
    
        /**
         * UTF8でファイルからテキストを読み込みます。
         *
         * @param file
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  9. src/bufio/scan.go

    	if atEOF && len(data) == 0 {
    		return 0, nil, nil
    	}
    
    	// Fast path 1: ASCII.
    	if data[0] < utf8.RuneSelf {
    		return 1, data[0:1], nil
    	}
    
    	// Fast path 2: Correct UTF-8 decode without error.
    	_, width := utf8.DecodeRune(data)
    	if width > 1 {
    		// It's a valid encoding. Width cannot be one for a correctly encoded
    		// non-ASCII rune.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  10. docs_src/security/tutorial007.py

        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 1.1K bytes
    - Viewed (0)
Back to top