I think [goog.string.format(@switcherPattern, base), caret].join '' would be faster