Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 249 for Truncate (0.19 sec)

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

        assertEquals("foobar", Ascii.truncate("foobar", 6, "…"));
        assertEquals("foob…", Ascii.truncate("foobar", 5, "…"));
        assertEquals("foo", Ascii.truncate("foobar", 3, ""));
        assertEquals("", Ascii.truncate("", 5, ""));
        assertEquals("", Ascii.truncate("", 5, "..."));
        assertEquals("", Ascii.truncate("", 0, ""));
      }
    
      public void testTruncateIllegalArguments() {
        try {
          Ascii.truncate("foobar", 2, "...");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/AsciiTest.java

        assertEquals("foobar", Ascii.truncate("foobar", 6, "…"));
        assertEquals("foob…", Ascii.truncate("foobar", 5, "…"));
        assertEquals("foo", Ascii.truncate("foobar", 3, ""));
        assertEquals("", Ascii.truncate("", 5, ""));
        assertEquals("", Ascii.truncate("", 5, "..."));
        assertEquals("", Ascii.truncate("", 0, ""));
      }
    
      public void testTruncateIllegalArguments() {
        try {
          Ascii.truncate("foobar", 2, "...");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb1/com/SmbComNTCreateAndX.java

         * aka OPEN_ALWAYS
         */
    
        static final int FILE_OPEN_IF = 0x3;
    
        /*
         * Open the file and overwrite it's contents or fail if it does not exist
         * aka TRUNCATE_EXISTING
         */
    
        static final int FILE_OVERWRITE = 0x4;
    
        /*
         * Open the file and overwrite it's contents or create it if it does not exist
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 8.2K bytes
    - Viewed (0)
  4. utils/tests/utils.go

    				format := "2006-01-02T15:04:05Z07:00"
    
    				if curTime.Round(time.Second).UTC().Format(format) != expect.(time.Time).Round(time.Second).UTC().Format(format) && curTime.Truncate(time.Second).UTC().Format(format) != expect.(time.Time).Truncate(time.Second).UTC().Format(format) {
    					t.Errorf("%v: expect: %v, got %v after time round", utils.FileWithLineNum(), expect.(time.Time), curTime)
    				}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. cmd/metacache-server-pool.go

    		return entries, listErr
    	}
    	entries.reuse = true
    	truncated := entries.len() > o.Limit || err == nil
    	entries.truncate(o.Limit)
    	if !o.Transient && truncated {
    		if o.ID == "" {
    			entries.listID = mustGetUUID()
    		} else {
    			entries.listID = o.ID
    		}
    	}
    	if !truncated {
    		return entries, io.EOF
    	}
    	return entries, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Ascii.java

       * the sequence will be returned as a string with no changes to the content.
       *
       * <p>Examples:
       *
       * <pre>{@code
       * Ascii.truncate("foobar", 7, "..."); // returns "foobar"
       * Ascii.truncate("foobar", 5, "..."); // returns "fo..."
       * }</pre>
       *
       * <p><b>Note:</b> This method <i>may</i> work with certain non-ASCII text but is not safe for use
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/smb1/SmbComNTCreateAndX.java

                // truncate the file
                if(( flags & SmbFile.O_CREAT ) == SmbFile.O_CREAT ) {
                    // create it if necessary
                    createDisposition = FILE_OVERWRITE_IF;
                } else {
                    createDisposition = FILE_OVERWRITE;
                }
            } else {
                // don't truncate the file
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 6.6K bytes
    - Viewed (0)
  8. internal/s3select/sql/funceval.go

    			return int64(f), true
    		}
    		return 0, false
    	}
    
    	switch x := v.value.(type) {
    	case float64:
    		// Truncate fractional part
    		return int64(x), nil
    	case int64:
    		return x, nil
    	case string:
    		// Parse as number, truncate floating point if
    		// needed.
    		// String might contain trimming spaces, which
    		// needs to be trimmed.
    		res, ok := strToInt(strings.TrimSpace(x))
    		if !ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 13.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/FileWriteMode.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    
    /**
     * Modes for opening a file for writing. The default when mode when none is specified is to truncate
     * the file before writing.
     *
     * @author Colin Decker
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public enum FileWriteMode {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  10. internal/s3select/simdj/reader_amd64_test.go

    				err = rec.WriteJSON(&gotB)
    				if err != nil {
    					t.Error(err)
    				}
    				err = want.WriteJSON(&wantB)
    				if err != nil {
    					t.Error(err)
    				}
    				// truncate newline from 'want'
    				wantB.Truncate(wantB.Len() - 1)
    				if !bytes.Equal(gotB.Bytes(), wantB.Bytes()) {
    					t.Errorf("JSON output mismatch.\nwant: %s\ngot:  %s", wantB.String(), gotB.String())
    				}
    			}
    		})
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.9K bytes
    - Viewed (0)
Back to top