0

I saw here in the doc that there is a placeholder notation like:

"El valor mínimo para este campo es de {0}"

But I didn't find the function that will do the replacement. I expect a function similar to sprintf in php to exist which allow to replace these strings like:

function_Im_looking_for("El valor mínimo para este campo es de {0}", 10);

that returns the string "El valor mínimo para este campo es de 10".

How can that replacement be achieved.

Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121

1 Answers1

2

Ext.String.format('Hello {0}', 'Foo');

It's worth noting that it doesn't attempt to do any formatting, just simple replacement. So you can't do something like {0:d/m/Y}

Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121
Evan Trimboli
  • 29,900
  • 6
  • 45
  • 66