- LimitUTF8StringLen
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user