sS withDollar(S s) { if (empty(s)) ret ""; int i = 0; if (startsWithOneOf(s, "+", "-")) ++i; ret insertStringAt(s, i, "$"); }