...
Excerpt |
---|
March 30, 2006 |
...
|
Just wanted to share a Kettle tip with you, this week on the subject of the Script Values step. Let's do ...
...
Code Block |
---|
----tel.lpad(9, '0');
var newTel;
if (tel.getString().startsWith("02") || tel.getString().startsWith("03"))
{
newTel=tel.getString().substr(0,2) + "/" + tel.getString().substr(2);
}
else
{
newTel=tel.getString().substr(0,3) + "/" + tel.getString().substr(3);
}
|
For example when the input is 54250137, the output would be 054/250137.
...