[ Agent ] [ CMII ] - 完成工具类的代码
This commit is contained in:
@@ -503,3 +503,17 @@ func BasicAppendNullToFile(targetFile string) bool {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func BasicWordSpaceCompletion(source string, totalLength int) string {
|
||||
sourceLength := len(source)
|
||||
|
||||
if sourceLength >= totalLength {
|
||||
return source
|
||||
}
|
||||
|
||||
for i := 0; i < totalLength-sourceLength; i++ {
|
||||
source += " "
|
||||
}
|
||||
|
||||
return source
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user