1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 22:30:49 +00:00

fix bug substr

This commit is contained in:
astaxie 2013-06-24 17:28:15 +08:00
parent 40c7b47c24
commit 3578bb3287

View File

@ -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
}