S function

Use C-style String Formatting Commands

Use C-style String Formatting Commands

Convenience wrapper for sprintf that allows recycling of of length one.

S(x, ...)

Arguments

  • x: A single string containing "%s".
  • ``: A vector of substitutions equal in length to the number of "%s" in x or of length one (if length one will be recycled).

Returns

Returns a string with "%s" replaced.

Examples

S("@after_", "the", "the") # Recycle S("@after_", "the") S("@rm_between", "LEFT", "RIGHT")

See Also

sprintf

  • Maintainer: Tyler Rinker
  • License: GPL-2
  • Last published: 2025-03-24