git-changelog-lib
git-changelog-lib copied to clipboard
String.length is not working in handlebars template
I am trying to use substring. But I cannot figure out the length of my String. According to Handlebars a .length should be possible but within the Jenkins pipeline it is not.
Try {{person.lastname.length}} in https://handlebarsjs.com/examples/path-expressions-dot.html
Does not work in Jenkins with {{issue.length}}
This library uses this implementation of Handlebars: https://github.com/jknack/handlebars.java
I do not see any length helper in those docs.
How do you want to use substring? What is the original value and what do you want it to be after substring?
oh okay, that would explain why the function is not there. I am using substring on String that is not static to cut the end that I dont need because it is wrapped by "[]". But as I do not know the length of the String I am not able to cut the last character from it.