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

Method left

core/string/ustring.cpp:4226–4242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4224}
4225
4226String String::left(int p_len) const {
4227 if (p_len < 0) {
4228 p_len = length() + p_len;
4229 }
4230
4231 if (p_len <= 0) {
4232 return "";
4233 }
4234
4235 if (p_len >= length()) {
4236 return *this;
4237 }
4238
4239 String s;
4240 s.copy_from_unchecked(&get_data()[0], p_len);
4241 return s;
4242}
4243
4244String String::right(int p_len) const {
4245 if (p_len < 0) {

Callers 15

add_input_portMethod · 0.80
remove_input_portMethod · 0.80
add_output_portMethod · 0.80
remove_output_portMethod · 0.80
set_input_port_typeMethod · 0.80
set_input_port_nameMethod · 0.80
set_output_port_typeMethod · 0.80
set_output_port_nameMethod · 0.80
set_ellipsis_charMethod · 0.80
set_ellipsis_charMethod · 0.80
tile_set.cppFile · 0.80
_html_submittedMethod · 0.80

Calls 2

get_dataFunction · 0.85
copy_from_uncheckedMethod · 0.80

Tested by 4

get_tooltip_stringMethod · 0.64
update_treeMethod · 0.64