If you look into my use case which is shared in this post, i am using the function to format it. For testing purpose i had sent the static string "12345678901234", but in your usecase you can pass the property which holds this value as input, for example,
String Input here means there is there is variable name "Input" which is of datatype "String". You can pass this "theValue" to some java method and in that java method, format it as per your requirement. Hope this clarifies.