Skip to content

Strings

For: advanced users shaping text.

Case folding, splitting, slicing, and regex tests. The one-line forms live in the cheatsheet.

Tag Meaning
<str.join:list,sep> Same join as <list.join>.
<str.split:text,delim> Literal split to a list (delimiter must be non-empty).
<str.lower:text> Lowercase.
<str.upper:text> Uppercase.
<str.contains:text,needle> true when held (case-sensitive).
<str.slice:text,start,end> End-exclusive slice; negatives count back, out-of-range clamps.
<str.matches:text,regex> true when the full text matches the regex.
<string.listformat:list> a, b, and c with mod-color items, gray separators (aliases <string.lformat>, <s.listformat>, <s.lformat>).

<str.join:list,separator> is the same join as <list.join>, and <str.split:text,delimiter> inverts it: the split is literal (never a pattern) and keeps every part, so splitting a join restores the list exactly. The delimiter must be non-empty, and text holding commas needs quotes (<str.split:"a,b",","> is [a, b]); dynamic comma text nests behind quotes too (<str.split:"<gflag:csv>",",">). <str.lower> and <str.upper> fold case, and <str.contains:text,needle> is a case-sensitive true/false test.

<string.listformat:list,itemcolor,sepcolor> renders a list as an Oxford sentence: one item bare, two as a and b, three or more as a, b, and c. Items wear the item color (the running mod color by default) and both separators (, and and) wear the separator color (gray by default). Both colors are optional overrides, as escaped MiniMessage (\<white\>) or legacy & codes; blank overrides warn and keep their default. The empty list warns and renders empty, and a non-list first arg warns plus null. The shorter heads <string.lformat>, <s.listformat>, and <s.lformat> are byte-identical twins: <s.lformat:[a,b,c]> is the same call in the shortest spelling, and a nested color such as <s.lformat:[a,b],<modcolor>> matches the default exactly.

<str.slice:text,start,end> slices end-exclusive with negatives from the end and clamping (<str.slice:hello,1,4> is ell), and <str.matches:text,regex> tests a full regex match.

Next Steps