MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / rpad

Method rpad

core/string/ustring.cpp:5447–5454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5445}
5446
5447String String::rpad(int min_length, const String &character) const {
5448 String s = *this;
5449 int padding = min_length - s.length();
5450 if (padding > 0) {
5451 s += character.repeat(padding);
5452 }
5453 return s;
5454}
5455
5456String String::lpad(int min_length, const String &character) const {
5457 String s = *this;

Callers 5

sprintfMethod · 0.80
format_help_optionMethod · 0.80
_item_menu_id_pressedMethod · 0.80
_update_listsMethod · 0.80
test_string.hFile · 0.80

Calls 2

repeatMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected