Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 520 for bytes (0.27 sec)

  1. src/bytes/bytes.go

    	return Map(c.ToTitle, s)
    }
    
    // ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes
    // representing invalid UTF-8 replaced with the bytes in replacement, which may be empty.
    func ToValidUTF8(s, replacement []byte) []byte {
    	b := make([]byte, 0, len(s)+len(replacement))
    	invalid := false // previous byte was from an invalid UTF-8 sequence
    	for i := 0; i < len(s); {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Bytes.java

       * @param arrays zero or more {@code byte} arrays
       * @return a single array containing all the values from the source arrays, in order
       */
      public static byte[] concat(byte[]... arrays) {
        int length = 0;
        for (byte[] array : arrays) {
          length += array.length;
        }
        byte[] result = new byte[length];
        int pos = 0;
        for (byte[] array : arrays) {
          System.arraycopy(array, 0, result, pos, array.length);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/BytesTest.java

                    new byte[] {(byte) 2, (byte) 3, (byte) 4}))
            .isEqualTo(2);
        assertThat(
                Bytes.indexOf(
                    new byte[] {(byte) 2, (byte) 2, (byte) 3, (byte) 4, (byte) 2, (byte) 3, (byte) 4},
                    new byte[] {(byte) 2, (byte) 3, (byte) 4}))
            .isEqualTo(1);
        assertThat(
                Bytes.indexOf(
                    new byte[] {(byte) 4, (byte) 3, (byte) 2},
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/Utf8Test.java

          actual += expected;
        }
        assertEquals(EXPECTED_FOUR_BYTE_ROUNDTRIPPABLE_COUNT, actual);
      }
    
      private static String newString(char... chars) {
        return new String(chars);
      }
    
      private static byte[] toByteArray(int... bytes) {
        byte[] realBytes = new byte[bytes.length];
        for (int i = 0; i < bytes.length; i++) {
          realBytes[i] = (byte) bytes[i];
        }
        return realBytes;
      }
    
    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)
  5. android/guava-tests/test/com/google/common/primitives/BytesTest.java

                    new byte[] {(byte) 2, (byte) 3, (byte) 4}))
            .isEqualTo(2);
        assertThat(
                Bytes.indexOf(
                    new byte[] {(byte) 2, (byte) 2, (byte) 3, (byte) 4, (byte) 2, (byte) 3, (byte) 4},
                    new byte[] {(byte) 2, (byte) 3, (byte) 4}))
            .isEqualTo(1);
        assertThat(
                Bytes.indexOf(
                    new byte[] {(byte) 4, (byte) 3, (byte) 2},
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  6. internal/grid/types.go

    }
    
    // Bytes provides a byte slice that can be serialized.
    type Bytes []byte
    
    // UnmarshalMsg deserializes b from the provided byte slice and returns the
    // remainder of bytes.
    func (b *Bytes) UnmarshalMsg(bytes []byte) ([]byte, error) {
    	if b == nil {
    		return bytes, errors.New("Bytes: UnmarshalMsg on nil pointer")
    	}
    	if bytes, err := msgp.ReadNilBytes(bytes); err == nil {
    		if *b != nil {
    			PutByteBuffer(*b)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/Utf8Test.java

          actual += expected;
        }
        assertEquals(EXPECTED_FOUR_BYTE_ROUNDTRIPPABLE_COUNT, actual);
      }
    
      private static String newString(char... chars) {
        return new String(chars);
      }
    
      private static byte[] toByteArray(int... bytes) {
        byte[] realBytes = new byte[bytes.length];
        for (int i = 0; i < bytes.length; i++) {
          realBytes[i] = (byte) bytes[i];
        }
        return realBytes;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. src/bytes/example_test.go

    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("O")))
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("Ami")))
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("")))
    	// Output:
    	// true
    	// false
    	// false
    	// true
    }
    
    func ExampleIndex() {
    	fmt.Println(bytes.Index([]byte("chicken"), []byte("ken")))
    	fmt.Println(bytes.Index([]byte("chicken"), []byte("dmr")))
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  9. logger/sql_test.go

    	}{
    		{
    			SQL:           "create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
    			NumericRegexp: nil,
    			Vars:          []interface{}{"jinzhu", 1, 999.99, true, []byte("12345"), tt, &tt, nil, "w@g.\"com", myrole, pwd},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. src/archive/tar/writer_test.go

    	}
    
    	// xattr bar should always appear before others
    	indices := []int{
    		bytes.Index(buf.Bytes(), []byte("bar=bar")),
    		bytes.Index(buf.Bytes(), []byte("baz=baz")),
    		bytes.Index(buf.Bytes(), []byte("foo=foo")),
    		bytes.Index(buf.Bytes(), []byte("qux=qux")),
    	}
    	if !sort.IntsAreSorted(indices) {
    		t.Fatal("PAX headers are not sorted")
    	}
    }
    
    func TestUSTARLongName(t *testing.T) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
Back to top