Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsafeToBytes ¶
UnsafeToBytes 非安全 string 转 []byte 他必须遵守上述规则
Example ¶
package main import ( "fmt" "github.com/ecodeclub/ekit/stringx" ) func main() { str := "hello" val := stringx.UnsafeToBytes(str) fmt.Println(len(val)) }
Output: 5
func UnsafeToString ¶
UnsafeToString 非安全 []byte 转 string 他必须遵守上述规则
Example ¶
package main import ( "fmt" "github.com/ecodeclub/ekit/stringx" ) func main() { val := stringx.UnsafeToString([]byte("hello")) fmt.Println(val) }
Output: hello
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.