Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 freemarker,我有一个value变量,它包含可变长度但小于 8 的字符串。
value
我只想在 8 个字符空间中打印它。
IE
${value}
应该跨越8个空格。
听起来你想要要么${value?right_pad(8)}要么${value?left_pad(8)}。
${value?right_pad(8)}
${value?left_pad(8)}