BoxLang 🚀 A New JVM Dynamic Language Learn More...

Spintax

v1.5.4 Modules

This module is a helper class to process Spintax strings.

{Hello|Howdy|Hola} to you, {Mr.|Mrs.|Ms.} {Smith|Williams|Davis}

Usage

var spintax = getModel('spintax@spintax');
var strData = "{Hello|Howdy|Hola} to you, {Mr.|Mrs.|Ms.} {Smith|Williams|Davis}!";

var spinned = spintax.spin(strData);

This code will output a random spun string generated:

Hola to you, Ms. Williams!

$ box install spintax

No collaborators yet.
     
  • {{ getFullDate("2017-05-29T10:39:37Z") }}
  • {{ getFullDate("2017-05-30T18:50:23Z") }}
  • 2,513
  • 0