Integer to string with leading zeroes

I would like to convert a property of nodes which is a integer to a string. I would use the toString()-function for that, but I need to convert them to a fixed length of the string. So there are some leading zeroes which need to be included in the string.

123 -> "123"
12 -> "012"
1 -> "001"

Is there any option for that in Cypher or Apoc?

Thank you,

JJJ

yes.. for example

 return apoc.text.lpad('1', 3, '0')

results in

001

and

 return apoc.text.lpad('123', 3, '0')

results in

123

see apoc.text.lpad - APOC Extended Documentation for more details

Thank you, very much appreciated!