diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-11-13 13:36:16 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-11-13 13:36:16 +0100 |
commit | 34852b296a372a81d0b97ab4c12f32be6d294cd3 (patch) | |
tree | 4f751a1551d21c24e7fe66d2a7ddf4444d10a569 /src/util/string.vala | |
parent | 80aa3fe15f6346102c29b9c4236fe1e89c283d3b (diff) | |
parent | 4098950bba8e6d8609395eb9b223c276cb5954b6 (diff) |
Merge branch 'release/debian/0.32.10-1'HEADdebian/0.32.10-1master
Diffstat (limited to 'src/util/string.vala')
-rw-r--r-- | src/util/string.vala | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/util/string.vala b/src/util/string.vala index 976f8ee..5ca4680 100644 --- a/src/util/string.vala +++ b/src/util/string.vala @@ -177,30 +177,6 @@ public inline bool contains_char(string haystack, unichar needle) { return haystack.index_of_char(needle) >= 0; } -public inline bool contains_str(string haystack, string needle) { - return haystack.index_of(needle) >= 0; -} - -public inline string? sliced_at(string str, int index) { - return (index >= 0) ? str[index:str.length] : null; -} - -public inline string? sliced_at_first_str(string haystack, string needle, int start_index = 0) { - return sliced_at(haystack, haystack.index_of(needle, start_index)); -} - -public inline string? sliced_at_last_str(string haystack, string needle, int start_index = 0) { - return sliced_at(haystack, haystack.last_index_of(needle, start_index)); -} - -public inline string? sliced_at_first_char(string haystack, unichar ch, int start_index = 0) { - return sliced_at(haystack, haystack.index_of_char(ch, start_index)); -} - -public inline string? sliced_at_last_char(string haystack, unichar ch, int start_index = 0) { - return sliced_at(haystack, haystack.last_index_of_char(ch, start_index)); -} - // Note that this method currently turns a word of all zeros into empty space ("000" -> "") public string strip_leading_zeroes(string str) { StringBuilder stripped = new StringBuilder(); |