[OpenSIPS-Devel] [OpenSIPS/opensips] caec1a: new string transformations: s.fill.left / s.fill.r...

Liviu Chircu liviu at opensips.org
Tue Sep 30 15:00:27 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: caec1a5b4e09707ce6ef148b751784c8ccdf015b
      https://github.com/OpenSIPS/opensips/commit/caec1a5b4e09707ce6ef148b751784c8ccdf015b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2014-09-30 (Tue, 30 Sep 2014)

  Changed paths:
    M transformations.c
    M transformations.h

  Log Message:
  -----------
  new string transformations: s.fill.left / s.fill.right

Fills a string with a char/string until the given final length is reached.
The initial string is returned if its length is greater or equal to the
given final length.

Examples:

$var(in) = "485"; (also works for integer PVs)

	* $(var(in){s.fill.left, 0, 6})    => 000485
	* $(var(in){s.fill.left, abc, 8})  => bcabc485
	* $(var(in){s.fill.right, 0, 6})   => 485000
	* $(var(in){s.fill.right, abc, 8}) => 485abcab




More information about the Devel mailing list