uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026

Warning

uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.

{@StringDQ}

Product: 

Class: 

Remarks

Shortcut: {@dqs}

Description: A specialized category matcher that identifies double-quoted string literals (" "), including triple double-quotes (""" """) and interpolated double-quoted strings.

The {@StringDQ} directive (shorthand {@dqs}) is used within a uCalc::Transformer to target literals specifically enclosed in double quotation marks. While the master {@String} (Topic 799) directive matches any string literal, {@StringDQ} provides the precision needed when a transformation only applies to a specific syntax style.

Supported Formats

  • Standard Double Quotes: "Content"
  • Triple Double Quotes: """Multi-line content"""
  • Interpolated Double Quotes: $"{expression}" (Captured structurally via balanced braces).

Advanced Capture: Suffix Indexing

When capturing a string with a named variable (e.g., {@dqs:txt}), you can control whether the delimiters are included in the replacement logic:

  • {txt(0)}: Returns the full string including the double quotes (e.g., "Hello").
  • {txt(1)}: Returns the inner content only (e.g., Hello). {txt} defaults to {txt(1)}

Comparison with Specific Matchers

DirectiveScopeUse Case
{@String}Any StringGeneral data handling where quote style doesn't matter.
{@StringDQ}" onlyJSON parsing or C# code generation where " is mandatory.
{@StringSQ}' onlySQL or Javascript specific transformations.

Inverse Matching with !

The universal inversion operator ! can be applied to this category:

  • {@dqs}: Matches a double-quoted string.
  • {!dqs}: Matches any token that is not a double-quoted string (including single-quoted strings).


Strategy & Critique

  • Precision: In environments like JSON, where single quotes are invalid, {@dqs} is a mandatory tool for ensuring structural validity.
  • Redundancy: Remind users that {@dqs} is a subset of {@String}. If a rule should apply to both types, use the parent directive to keep the code DRY (Don't Repeat Yourself).
  • Naming: The shorthand {@dqs} is highly efficient, though the full name {@StringDQ} should be used in documentation for clarity.

Current Time: Tuesday, January 13, 2026 at 9:48 PM EST.

Examples