mirror of
https://github.com/astaxie/beego.git
synced 2025-04-29 21:46:51 +00:00
fix bug substr
This commit is contained in:
parent
40c7b47c24
commit
3578bb3287
2
utils.go
2
utils.go
@ -32,7 +32,7 @@ func Substr(s string, start, length int) string {
|
||||
}
|
||||
var end int
|
||||
if (start + length) > (len(bt) - 1) {
|
||||
end = len(bt) - 1
|
||||
end = len(bt)
|
||||
} else {
|
||||
end = start + length
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user