| 835 | } |
| 836 | |
| 837 | String String::get_with_code_lines() const { |
| 838 | const Vector<String> lines = split("\n"); |
| 839 | String ret; |
| 840 | for (int i = 0; i < lines.size(); i++) { |
| 841 | if (i > 0) { |
| 842 | ret += "\n"; |
| 843 | } |
| 844 | ret += vformat("%4d | %s", i + 1, lines[i]); |
| 845 | } |
| 846 | return ret; |
| 847 | } |
| 848 | |
| 849 | int String::get_slice_count(const String &p_splitter) const { |
| 850 | if (is_empty()) { |
no test coverage detected