| 3832 | } |
| 3833 | |
| 3834 | bool 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 | |
| 3861 | bool String::begins_with(const char* p_string) const |
| 3862 | { |
no test coverage detected