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

Method is_valid_ascii_identifier

core/string/ustring.cpp:4598–4618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4596}
4597
4598bool String::is_valid_ascii_identifier() const {
4599 int len = length();
4600
4601 if (len == 0) {
4602 return false;
4603 }
4604
4605 if (is_digit(operator[](0))) {
4606 return false;
4607 }
4608
4609 const char32_t *str = &operator[](0);
4610
4611 for (int i = 0; i < len; i++) {
4612 if (!is_ascii_identifier_char(str[i])) {
4613 return false;
4614 }
4615 }
4616
4617 return true;
4618}
4619
4620bool String::is_valid_unicode_identifier() const {
4621 const char32_t *str = ptr();

Callers 15

add_varyingMethod · 0.80
is_valid_port_nameMethod · 0.80
complete_codeMethod · 0.80
register_singletonMethod · 0.80
set_metaMethod · 0.80
_get_hierarchyFunction · 0.80
_inline_object_parseMethod · 0.80
drop_data_fwMethod · 0.80
add_custom_typeMethod · 0.80
_varying_validateMethod · 0.80
_check_meta_nameMethod · 0.80

Calls 2

is_digitFunction · 0.85
is_ascii_identifier_charFunction · 0.85

Tested by 2

validate_argumentFunction · 0.64
add_exposed_classesFunction · 0.64