Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for Truncate (0.18 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 May 03 12:43:13 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. guava-tests/test/com/google/common/io/TestByteSink.java

      @Override
      public boolean wasStreamClosed() {
        return outputStreamClosed;
      }
    
      @Override
      public OutputStream openStream() throws IOException {
        outputStreamOpened = true;
        bytes.reset(); // truncate
        return new Out();
      }
    
      private final class Out extends TestOutputStream {
    
        public Out() throws IOException {
          super(bytes, options);
        }
    
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 15 13:47:32 GMT 2016
    - 1.8K bytes
    - Viewed (0)
  4. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/SmbRandomAccess.java

    
        /**
         * Get the current file length
         * 
         * @return file length
         * @throws SmbException
         */
        long length () throws SmbException;
    
    
        /**
         * Expand/truncate file length
         * 
         * @param newLength
         *            new file length
         * @throws SmbException
         */
        void setLength ( long newLength ) throws SmbException;
    
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 2.5K bytes
    - Viewed (0)
  6. 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 May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 8.2K 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 May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 6.6K bytes
    - Viewed (0)
  8. 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 05 12:43:09 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K 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. src/main/java/jcifs/smb1/smb1/SmbComOpenAndX.java

                // truncate the file
                if(( flags & SmbFile.O_CREAT ) == SmbFile.O_CREAT ) {
                    // create it if necessary
                    openFunction = OPEN_FN_TRUNC | OPEN_FN_CREATE;
                } else {
                    openFunction = OPEN_FN_TRUNC;
                }
            } else {
                // don't truncate the file
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 5.7K bytes
    - Viewed (0)
Back to top