Skip to main content

String functions

  • {formatPerm}: Converts a Pascal Discord permission to a more human-readable format

    • Arguments:
      • permission = ""
    • Example result: Send Messages
      • Using input: {formatPerm;SendMessages}
    • Example result: Administrator
      • Using input: {formatPerm;Administrator}
    • Example result: Use Voice Activity
      • Using input: {formatPerm;UseVAD}
    • Example result: View Creator Monetization Analytics
      • Using input: {formatPerm;ViewCreatorMonetizationAnalytics}
  • {ordinal}: Adds the specific ordinal suffix to the given number

    • Arguments:
      • number = 1
    • Example result: -4th
      • Using input: {ordinal;-4}
    • Example result: -1th
      • Using input: {ordinal;-1}
    • Example result: 0th
      • Using input: {ordinal;0}
    • Example result: 1st
      • Using input: {ordinal;1}
    • Example result: 2nd
      • Using input: {ordinal;2}
    • Example result: 3rd
      • Using input: {ordinal;3}
    • Example result: 4th
      • Using input: {ordinal;4}
    • Example result: 10th
      • Using input: {ordinal;10}
    • Example result: 11th
      • Using input: {ordinal;11}
    • Example result: 12th
      • Using input: {ordinal;12}
    • Example result: 13th
      • Using input: {ordinal;13}
    • Example result: 14th
      • Using input: {ordinal;14}
    • Example result: 21st
      • Using input: {ordinal;21}
    • Example result: 22nd
      • Using input: {ordinal;22}
    • Example result: 101st
      • Using input: {ordinal;101}
    • Example result: 111th
      • Using input: {ordinal;111}
  • {length}: Returns the length of the given string

    • Arguments:
      • value = ""
    • Example result: 4
      • Using input: {length;test}
  • {upper}: Uppercases the given string

    • Arguments:
      • value = ""
    • Example result: TEST
      • Using input: {upper;test}
  • {lower}: Lowercases the given string

    • Arguments:
      • value = ""
    • Example result: test
      • Using input: {lower;TEST}
  • {trim}: Trims the given string at the beginning and end

    • Arguments:
      • value = ""
    • Example result: test
      • Using input: {trim; test }
      • Using input: {trim; test}
  • {trimStart}: Trims the given string at the beginning

    • Arguments:
      • value = ""
    • Example result: test
      • Using input: {trimStart; test}
  • {trimEnd}: Trims the given string at the end

    • Arguments:
      • value = ""
    • Example result: test
      • Using input: {trimEnd;test }
  • {substring}: Returns a part of the given string

    • Arguments:
      • value = ""
      • start = 0
      • end = value.length
    • Example result: test
      • Using input: {substring;test;0;4}
    • Example result: tes
      • Using input: {substring;test;0;3}
    • Example result: <empty>
      • Using input: {substring;test;0;0}
    • Example result: test
      • Using input: {substring;test;0;5}
    • Example result: <empty>
      • Using input: {substring;test;0;-1}
  • {urlEncode}: URL encodes the given string

    • Arguments:
      • value = ""
    • Example result: %20
      • Using input: {urlEncode; }
  • {urlDecode}: URL decodes the given string

    • Arguments:
      • value = ""
    • Example result: <empty>
      • Using input: {urlDecode;%20}
  • {replace}: Replaces the first occurence of the text in the given string

    • Arguments:
      • value
      • search
      • replace = ""
    • Example result: test
      • Using input: {replace;tezt;z;s}
      • Using input: {replace;text;x;s}
  • {replaceAll}: Replaces all occurences of the text in the given string

    • Arguments:
      • value
      • search
      • replace = ""
    • Example result: test
      • Using input: {replaceAll;text;x;s}
  • {randomItem}: Picks the given amount of items from a list separated by ,

    • Arguments:
      • items = "Hello,World"
      • amount = 1
      • separator = ","
  • {repeat}: Repeats the given text the given amount of times

    • Arguments:
      • value
      • times = 2
    • Example result: testtest
      • Using input: {repeat;test;2}