- LimitUTF8StringLen

This commit is contained in:
gazebo
2019-03-31 12:13:47 +08:00
parent 12781c14be
commit d2fafe5ec0
4 changed files with 3 additions and 18 deletions

View File

@@ -311,12 +311,3 @@ func AddVendorInfo2Err(inErr error, vendorID int) (outErr error) {
}
return outErr
}
func LimitStringLen(str string, maxLen int) (limitedStr string) {
if maxLen > 0 {
if strLen := len(str); strLen > maxLen {
str = str[:maxLen]
}
}
return str
}