forked from mirror/readline
fix wordbreak to add number
This commit is contained in:
parent
4e554e2dd0
commit
bb5b4af6e7
13
utils.go
13
utils.go
|
@ -137,14 +137,15 @@ func LineCount(screenWidth, w int) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsWordBreak(i rune) bool {
|
func IsWordBreak(i rune) bool {
|
||||||
if i >= 'a' && i <= 'z' {
|
switch {
|
||||||
return false
|
case i >= 'a' && i <= 'z':
|
||||||
}
|
case i >= 'A' && i <= 'Z':
|
||||||
if i >= 'A' && i <= 'Z' {
|
case i >= '0' && i <= '9':
|
||||||
return false
|
default:
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func GetInt(s []string, def int) int {
|
func GetInt(s []string, def int) int {
|
||||||
if len(s) == 0 {
|
if len(s) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue