Example #1
0
func Benchmark4(b *testing.B) {
	for n := 0; n < b.N; n++ {
		_ = lucy.StringWidth(long)
	}
}
Example #2
0
func Benchmark3(b *testing.B) {
	for n := 0; n < b.N; n++ {
		_ = lucy.StringWidth("あいうえおあいうえおえおおおおおおおおおおおおおおおおおおおおおおおおおおおおおお")
	}
}
Example #3
0
func BenchmarkEasyString(b *testing.B) {
	for n := 0; n < b.N; n++ {
		_ = lucy.StringWidth("abcdefgkljjsfkjn")
	}
}
Example #4
0
func Benchmark2(b *testing.B) {
	for n := 0; n < b.N; n++ {
		_ = lucy.StringWidth("■㈱の世界①")
	}
}
Example #5
0
func rsw(r rune) int {
	return runewidth.StringWidth(string(r))
}