MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / begins_with

Method begins_with

modules/gui/gui/src/backend/text_server/ustring.cpp:3834–3859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3832}
3833
3834bool String::begins_with(const String& p_string) const
3835{
3836 int l = p_string.length();
3837 if (l > length())
3838 {
3839 return false;
3840 }
3841
3842 if (l == 0)
3843 {
3844 return true;
3845 }
3846
3847 const char32_t* p = &p_string[0];
3848 const char32_t* s = &operator[](0);
3849
3850 for (int i = 0; i < l; i++)
3851 {
3852 if (p[i] != s[i])
3853 {
3854 return false;
3855 }
3856 }
3857
3858 return true;
3859}
3860
3861bool String::begins_with(const char* p_string) const
3862{

Callers 4

parse_urlMethod · 0.80
simplify_pathMethod · 0.80
trim_prefixMethod · 0.80
path_toMethod · 0.80

Calls 2

lengthFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected