diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-22 00:13:44 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-22 00:13:44 +0300 |
commit | 1b5abfcaae0188233415b37dcc0a3df1c7ee0656 (patch) | |
tree | 3b04d97917e3323ad0c8b66d4f12eef346dd88df /py/objstrunicode.c | |
parent | 2c573f00b8ce1ef67e8e754b5231e061fbd5b064 (diff) | |
download | micropython-1b5abfcaae0188233415b37dcc0a3df1c7ee0656.tar.gz micropython-1b5abfcaae0188233415b37dcc0a3df1c7ee0656.zip |
py/objstr: Implement str.center().
Disabled by default, enabled in unix port. Need for this method easily
pops up when working with text UI/reporting, and coding workalike
manually again and again counter-productive.
Diffstat (limited to 'py/objstrunicode.c')
-rw-r--r-- | py/objstrunicode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objstrunicode.c b/py/objstrunicode.c index 8099e20a0e..5e14da451d 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -238,6 +238,7 @@ STATIC const mp_rom_map_elem_t struni_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_count), MP_ROM_PTR(&str_count_obj) }, { MP_ROM_QSTR(MP_QSTR_partition), MP_ROM_PTR(&str_partition_obj) }, { MP_ROM_QSTR(MP_QSTR_rpartition), MP_ROM_PTR(&str_rpartition_obj) }, + { MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&str_center_obj) }, { MP_ROM_QSTR(MP_QSTR_lower), MP_ROM_PTR(&str_lower_obj) }, { MP_ROM_QSTR(MP_QSTR_upper), MP_ROM_PTR(&str_upper_obj) }, { MP_ROM_QSTR(MP_QSTR_isspace), MP_ROM_PTR(&str_isspace_obj) }, |