| 874 | } |
| 875 | |
| 876 | String lowercase(StringView string) { |
| 877 | // Theoretically doing the copy in the same loop as case change could be faster for *really long* strings due |
| 878 | // to cache reuse, but until that proves to be a bottleneck I'll go with the simpler solution. |
| 879 | // Not implementing through lowercase(String) as the call stack is deep enough already and we don't |
| 880 | // need the extra checks there. |
| 881 | String out{string}; |
| 882 | lowercaseInPlace(out); |
| 883 | return out; |
| 884 | } |
| 885 | |
| 886 | String lowercase(String string) { |
| 887 | // In the rare scenario where we'd get a non-owned string (such as String::nullTerminatedView() passed right |
no test coverage detected