Back to API Reference
Class
StringParseRule
sealed
Inherits:ParseRule
Matches literal string patterns and optionally replaces them.
Remarks
Useful for custom shortcodes, emoji aliases, or text substitutions. Example: pattern ":)" with replacement "😊".
public override int TryMatch(ReadOnlySpan<char> text, int index, PooledList<ParsedRange> results)