// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package util import ( "fmt" "testing" ) func Test_TruncateRune(t *testing.T) { fmt.Println(TruncateRune(`中 国★2↓sd人民子弟兵团`, 7)) } func Test_TruncateRuneNoHtmlTags(t *testing.T) { fmt.Println(TruncateRuneNoHtmlTags(`中
国★2↓sd人民子弟兵团!@@!!#
`, 7)) }