mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
support more padding char
This commit is contained in:
parent
6e86375f9b
commit
d3d07d060c
@ -397,9 +397,12 @@ PyObject* VM::format(Str spec, PyObject* obj){
|
||||
}
|
||||
|
||||
char pad_c = ' ';
|
||||
if(spec[0] == '0'){
|
||||
pad_c = '0';
|
||||
for(char c: std::string_view("0-=*#@!~")){
|
||||
if(spec[0] == c){
|
||||
pad_c = c;
|
||||
spec = spec.substr(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
char align;
|
||||
if(spec[0] == '>'){
|
||||
|
Loading…
x
Reference in New Issue
Block a user