mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
Fixed sequence leading zeros.
This commit is contained in:
parent
34870fd759
commit
7155626dc0
@ -70,9 +70,10 @@ public class Sequence {
|
||||
public String getPath (String basePath, int index) {
|
||||
StringBuilder buffer = new StringBuilder(basePath.length() + digits);
|
||||
buffer.append(basePath);
|
||||
buffer.append(start + index);
|
||||
while (buffer.length() < digits)
|
||||
String frame = Integer.toString(start + index);
|
||||
for (int i = digits - frame.length(); i > 0; i--)
|
||||
buffer.append('0');
|
||||
buffer.append(frame);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user