Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for trimLeft (0.17 sec)

  1. src/cmd/asm/internal/asm/endtoend_test.go

    }
    
    func isHexes(s string) bool {
    	if s == "" {
    		return false
    	}
    	if s == "empty" {
    		return true
    	}
    	for _, f := range strings.Split(s, " or ") {
    		if f == "" || len(f)%2 != 0 || strings.TrimLeft(f, "0123456789abcdef") != "" {
    			return false
    		}
    	}
    	return true
    }
    
    // It would be nice if the error messages always began with
    // the standard file:line: prefix,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  2. src/bytes/example_test.go

    	// Output:
    	// -gopher!
    	// "go-gopher!"
    	// go-gopher
    	// go-gopher!
    }
    
    func ExampleTrimLeft() {
    	fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789")))
    	// Output:
    	// gopher8257
    }
    
    func ExampleTrimLeftFunc() {
    	fmt.Println(string(bytes.TrimLeftFunc([]byte("go-gopher"), unicode.IsLetter)))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. src/bytes/bytes.go

    		return trimLeftASCII(trimRightASCII(s, &as), &as)
    	}
    	return trimLeftUnicode(trimRightUnicode(s, cutset), cutset)
    }
    
    // TrimLeft returns a subslice of s by slicing off all leading
    // UTF-8-encoded code points contained in cutset.
    func TrimLeft(s []byte, cutset string) []byte {
    	if len(s) == 0 {
    		// This is what we've historically done.
    		return nil
    	}
    	if cutset == "" {
    		return s
    	}
    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)
  4. src/main/java/org/codelibs/core/lang/StringUtil.java

         * @param trimText
         *            削る文字列
         * @return 結果の文字列
         */
        public static final String rtrim(final String text, String trimText) {
            if (text == null) {
                return null;
            }
            if (trimText == null) {
                trimText = " ";
            }
            int pos = text.length() - 1;
            for (; pos >= 0; pos--) {
                if (trimText.indexOf(text.charAt(pos)) < 0) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.7K bytes
    - Viewed (0)
Back to top