demo2_test.go 341 B

1234567891011121314151617
  1. package test
  2. import (
  3. "fmt"
  4. "github.com/gogf/gf/text/gstr"
  5. "testing"
  6. )
  7. func TestDemo2(t *testing.T) {
  8. t.Run("Adapters_test", test21)
  9. }
  10. func test21(t *testing.T) {
  11. str := "字s符s串.中文测试"
  12. fmt.Println(gstr.SearchArray(gstr.Split(str, ""), "."))
  13. fmt.Println(gstr.SubStr(str, gstr.SearchArray(gstr.Split(str, ""), ".")+1))
  14. }