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

Method right

core/string/ustring.cpp:4244–4260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4242}
4243
4244String String::right(int p_len) const {
4245 if (p_len < 0) {
4246 p_len = length() + p_len;
4247 }
4248
4249 if (p_len <= 0) {
4250 return "";
4251 }
4252
4253 if (p_len >= length()) {
4254 return *this;
4255 }
4256
4257 String s;
4258 s.copy_from_unchecked(&get_data()[length() - p_len], p_len);
4259 return s;
4260}
4261
4262char32_t String::unicode_at(int p_idx) const {
4263 ERR_FAIL_INDEX_V(p_idx, length(), 0);

Callers 7

get_importer_by_fileMethod · 0.80
recognize_pathMethod · 0.80
update_treeMethod · 0.80
_ensure_allowed_typesMethod · 0.80
_can_import_fileMethod · 0.80
test_string.hFile · 0.80

Calls 2

get_dataFunction · 0.85
copy_from_uncheckedMethod · 0.80

Tested by 1

update_treeMethod · 0.64