Support complicated variable references
Bug: 226974242 Test: go test Change-Id: Iaec16f5c498e7c75c9ee5d53d3499efadfba16bc
This commit is contained in:
@@ -234,10 +234,10 @@ func (ms *MakeString) splitNFunc(n int, splitFunc func(s string, n int) []string
|
||||
if n != 0 {
|
||||
split := splitFunc(s, n)
|
||||
if n != -1 {
|
||||
if len(split) > n {
|
||||
if len(split) > n || len(split) == 0 {
|
||||
panic("oops!")
|
||||
} else {
|
||||
n -= len(split)
|
||||
n -= len(split) - 1
|
||||
}
|
||||
}
|
||||
curMs.appendString(split[0])
|
||||
|
Reference in New Issue
Block a user