Skip to content

string_util

IsaacShelton edited this page Nov 13, 2022 · 6 revisions

string_util

2.7/string_util.adept defines several utilities for dealing with String values.

Functions

  • func split(this *String, delimiter String) <String> List

    Splits a String into multiple Strings.

    Each occurrence of delimiter will mark where two strings should be separated.

    [view src]

  • func splitIntoViews(this *String, delimiter String) <StringView> List

    Splits a String into multiple Strings.

    Each occurrence of delimiter will mark where two strings should be separated.

    Returns a List of String views that reference the data of the original string.

    [view src]

  • func levenshtein(s1, s2 String) usize

    Calculates the levenshtein distance between two Strings.

    [view src]

  • func getUntil(this *String, delimiter ubyte) String

    Returns a copy of a string ranging up to the first occurrence of delimiter.

    [view src]

  • func getUntil(this *String, delimiter String) String

    Returns a copy of a string ranging up to the first occurrence of delimiter.

    [view src]

  • func getUntilAsView(this *String, delimiter ubyte) StringView

    Returns a view of a string ranging up to the first occurrence of delimiter.

    [view src]

  • func getUntilAsView(this *String, delimiter String) StringView

    Returns a view of a string ranging up to the first occurrence of delimiter.

    [view src]

  • 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, then this.length will be returned.

    [view src]

  • 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, then this.length will be returned.

    [view src]

  • func removeUntil(this *String, delimiter String) void

    Removes everything in a string up to the first occurrence of delimiter.

    [view src]

  • func removedUntil(this *String, delimiter String) String

    Returns a copy of a string with everything removed up to the first occurrence of delimiter.

    [view src]

Clone this wiki locally