ddn.columnar.strings

The literal string namespace of ddn.df (ADR-2026-10-23-12): length, case mapping, stripping, slicing and literal matching over UTF-8 with code-point indices and full Unicode semantics via Phobis - std.uni case mapping (length changes preserved: ß uppercases to SS) and whitespace. Regex does not exist here and nothing in this module implies its syntax; matching is literal substring containment.

Nulls propagate to null slots (the null doctrine - no empty-string defaulting); outputs are fresh sealed STRING chunks through the builder shapes; input frames are never mutated.

Types 1

private structStringResult

The output side of every string op: fresh values and validity.

Fields
string[] values
bool[] valid

Functions 32

private fnStringResult mapSlots(alias fn)(Series s)
fnSeries strLengthUnits(Series s)The code-point length of each string (ADR-2026-10-23-12): INT64 output; nulls stay null. Byte counts are not offered (documented - code points are the unit of every index in this namespace).
fnSeries strUpper(Series s)Ditto, full Unicode upper-case (`std.uni` - `ß` becomes `SS`).
fnSeries strLower(Series s)Ditto, full Unicode lower-case.
fnSeries strStrip(Series s)Ditto, Unicode whitespace stripped from both ends.
fnSeries strStripLeading(Series s)Ditto, leading whitespace only.
fnSeries strStripTrailing(Series s)Ditto, trailing whitespace only.
private fnstring stripBoth(scope const(char)[] v)
fnSeries strSlice(Series s, long start, long end)The code-point slice `[start, end)` of each string (ADR-2026-10-23-12): negative indices count from the end (Python/Polars semantics); out-of-range clamps; nulls propagate. A slice clamps where `ta...
fnSeries strContainsLit(Series s, string lit)Literal substring containment (`contains(lit)`).
fnSeries strStartsWithLit(Series s, string lit)Ditto, `startsWith(lit)` (literal).
fnSeries strEndsWithLit(Series s, string lit)Ditto, `endsWith(lit)` (literal).
fnSeries strConcat(Series s, Series other)Slot-wise concatenation (ADR-2026-10-23-12): `concat(other)` appends element-wise; a null on either side yields null (the null doctrine - no empty-string defaulting).
fnSeries strConcatLit(Series s, string lit)Ditto, appending a literal to every slot.
private fnlong countCp(scope const(char)[] v) @safe pure
private fnSeries mapCaseSeries(bool up)(Series s)
private fnbool allAscii(scope const(char)[] v) @safe pure nothrow
private fnsize_t mapAsciiCase(bool up)(scope const(char)[] v, char[] dst) @safe pure nothrow
private fnsize_t mappedCaseBytes(bool up)(scope const(char)[] v) @safe pure
private fnsize_t mapUnicodeCase(bool up)(scope const(char)[] v, char[] dst) @safe pure
private fnstring stripLeftOf(scope const(char)[] v) @safe pure
private fnstring stripRightOf(scope const(char)[] v) @safe pure
private fnstring sliceOf(scope const(char)[] v, long start, long end) @safe pure
fnSeries strSplit(Series s, string sep)Splits each string by a literal separator into a LIST<STRING> column (ADR-2026-10-23-14): an empty separator throws (not a code-point split); repeated separators yield empty tokens; leading/trailin...
fnSeries strReplaceLit(Series s, string from, string to)Replaces every occurrence of the literal `from` with `to` (ADR-2026-10-30-01): a left-to-right non-overlapping scan; the replacement text is never rescanned (Python `str.replace` / `np.char.replace...
fnSeries strPadStart(Series s, long width, dchar fill = ' ')Left-pads each string to a code-point `width` with `fill` (ADR-2026-10-30-01): strings already at or beyond the width are returned unchanged (never truncated); `fill` encodes once and repeats; null...
fnSeries strPadEnd(Series s, long width, dchar fill = ' ')Ditto, right-padding.
private fnSeries padInto(Series s, long width, dchar fill, bool atStart)
fnSeries strZfill(Series s, long width)Left-pads each string with `'0'` to a code-point `width`, sign-aware (ADR-2026-10-30-01): a leading `'-'` or `'+'` stays in front of the zeros (Python `str.zfill`); strings already at or beyond the...
fnSeries strRepeat(Series s, long n)Repeats each string `n` times (ADR-2026-10-30-01): `n = 0` yields the empty string (valid data, not null); the total output size is checked before any allocation; null strings stay null.
fnSeries strReplaceRegex(Series s, string pattern, string replacement, RegexScope replaceScope = RegexScope.ALL)Replaces regex matches with `replacement` (ADR-2026-10-30-01): the pattern compiles once per call (Phobos `std.regex`, ECMAScript flavour, case-sensitive - no flags in v1); `scope = ALL` (default) ...