-
-
Notifications
You must be signed in to change notification settings - Fork 9
string_util
2.7/string_util.adept
defines several utilities for dealing with String
values.
-
func split(this *String, delimiter String) <String> List
Splits a
String
into multipleString
s.Each occurrence of
delimiter
will mark where two strings should be separated. -
func splitIntoViews(this *String, delimiter String) <StringView> List
Splits a
String
into multipleString
s.Each occurrence of
delimiter
will mark where two strings should be separated.Returns a
List
ofString
views that reference the data of the original string. -
func levenshtein(s1, s2 String) usize
Calculates the levenshtein distance between two
String
s. -
func getUntil(this *String, delimiter ubyte) String
Returns a copy of a string ranging up to the first occurrence of
delimiter
. -
func getUntil(this *String, delimiter String) String
Returns a copy of a string ranging up to the first occurrence of
delimiter
. -
func getUntilAsView(this *String, delimiter ubyte) StringView
Returns a view of a string ranging up to the first occurrence of
delimiter
. -
func getUntilAsView(this *String, delimiter String) StringView
Returns a view of a string ranging up to the first occurrence of
delimiter
. -
func atUntil(this *String, delimiter ubyte) usize
Returns where the first occurrence of
delimiter
is within a string.If
delimiter
is not in the string, thenthis.length
will be returned. -
func atUntil(this *String, delimiter String) usize
Returns where the first occurrence of
delimiter
is within a string.If
delimiter
is not in the string, thenthis.length
will be returned. -
func removeUntil(this *String, delimiter String) void
Removes everything in a string up to the first occurrence of
delimiter
. -
func removedUntil(this *String, delimiter String) String
Returns a copy of a string with everything removed up to the first occurrence of
delimiter
.