newxml.faststrings

This module implements fast search and compare functions on slices. In the future, these may be optimized by means of aggressive specialization, inline assembly and SIMD instructions.

Members

Functions

checkStringBeforeChr
bool checkStringBeforeChr(T[] haysack, S[] needle, S before)
Undocumented in source. Be warned that the author may not have intended to support it.
fastEqual
bool fastEqual(T[] t, S[] s)

Compares two strings, and returns true if they're both equal. Both input must be of equal lengths.

fastIndexOf
ptrdiff_t fastIndexOf(T[] t, S s)

Returns the index of the first occurrence of a value in a slice. Returns -1 if nor found.

fastIndexOfAny
ptrdiff_t fastIndexOfAny(T[] t, S[] s)

Returns the index of the first occurrence of any of the values in the second slice inside the first one.

fastIndexOfNeither
ptrdiff_t fastIndexOfNeither(T[] t, S[] s)

Returns the index of the first occurrence of a value of the first slice that does not appear in the second.

fastLastIndexOf
ptrdiff_t fastLastIndexOf(T[] t, S s)

Returns the index of the last occurrence of a value in a slice. Returns -1 if nor found.

xmlEscape
T[] xmlEscape(T[] str)

Returns a copy of the input string, after escaping all XML reserved characters.

xmlEscapedWrite
void xmlEscapedWrite(Out output, T[] str)

Writes the input string to the given output range, after escaping all XML reserved characters.

xmlPredefinedEntities
auto xmlPredefinedEntities()
Undocumented in source. Be warned that the author may not have intended to support it.
xmlUnescape
T[] xmlUnescape(T[] str, U replacements)

Returns a copy of the input string, after unescaping all known entity references.

xmlUnescape
T[] xmlUnescape(T[] str)
Undocumented in source. Be warned that the author may not have intended to support it.
xmlUnescapedWrite
void xmlUnescapedWrite(Out output, T[] str, U replacements)

Outputs the input string to the given output range, after unescaping all known entity references.

Meta