adding gres package for resource feature

This commit is contained in:
john
2019-08-10 23:36:38 +08:00
parent d03180ff4d
commit 7ecc47e127
17 changed files with 329 additions and 40 deletions

View File

@ -16,7 +16,7 @@ import (
"unicode"
"unicode/utf8"
"github.com/gogf/gf/internal/strutils"
"github.com/gogf/gf/internal/utilstr"
"github.com/gogf/gf/util/gconv"
@ -98,7 +98,7 @@ func ReplaceIByArray(origin string, array []string) string {
// ReplaceByMap returns a copy of <origin>,
// which is replaced by a map in unordered way, case-sensitively.
func ReplaceByMap(origin string, replaces map[string]string) string {
return strutils.ReplaceByMap(origin, replaces)
return utilstr.ReplaceByMap(origin, replaces)
}
// ReplaceIByMap returns a copy of <origin>,
@ -122,7 +122,7 @@ func ToUpper(s string) string {
// UcFirst returns a copy of the string s with the first letter mapped to its upper case.
func UcFirst(s string) string {
return strutils.UcFirst(s)
return utilstr.UcFirst(s)
}
// LcFirst returns a copy of the string s with the first letter mapped to its lower case.
@ -143,17 +143,17 @@ func UcWords(str string) string {
// IsLetterLower tests whether the given byte b is in lower case.
func IsLetterLower(b byte) bool {
return strutils.IsLetterLower(b)
return utilstr.IsLetterLower(b)
}
// IsLetterUpper tests whether the given byte b is in upper case.
func IsLetterUpper(b byte) bool {
return strutils.IsLetterUpper(b)
return utilstr.IsLetterUpper(b)
}
// IsNumeric tests whether the given string s is numeric.
func IsNumeric(s string) bool {
return strutils.IsNumeric(s)
return utilstr.IsNumeric(s)
}
// SubStr returns a portion of string <str> specified by the <start> and <length> parameters.