I have a LESS variable:
@columns: 12;
I create a dynamic class name out of it:
.one-@{columns} {} // returns .one-12 {}
How do I replace the 12 with a string "twelfth"
Pseudo Code
.one-@{replace(columns, "twelfth")} {}
The result will be .one-twelfth {}
Advice will be appreciated!
Assuming (as revealed in comments) you can't change the value of
@columns
variable itself and its possible values are not infinite, a trivial integer to string (or anything else) conversion table (a simple list) will do the trick: