1
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package platformapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -64,12 +64,9 @@ func Test_store(b *testing.T) {
|
||||
}
|
||||
|
||||
func Test_string_byte(t *testing.T) {
|
||||
//rankKey := map[string]string{"a": "刘磊", "b": "张雨绮%s", "c": "<center>下单时间:%s</center>"}
|
||||
//data, _ := json.Marshal(rankKey)
|
||||
|
||||
dd := `{"a": "刘磊", "b": "张雨绮%s", "c": "<center>下单时间:%s</center>"}`
|
||||
var ee map[string]string
|
||||
err := json.Unmarshal([]byte(dd), ee)
|
||||
fmt.Println(err)
|
||||
fmt.Println("dd:", ee)
|
||||
aa := `<b>%s</b><b>1111111111111111111</b>`
|
||||
bb := strings.Replace(aa, "<b>", "<hb>", -1)
|
||||
cc := strings.Replace(bb, "</b>", "</hb>", -1)
|
||||
fmt.Println("bb===========", bb)
|
||||
fmt.Println("cc===========", cc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user