简体   繁体   中英

Representing string of length 4 in 8 character length

I am working with freemarker and i have value variable that holds string of variable length but less than 8.

What i want to print it in 8 character spaces only.

ie

${value}

should be spanned over 8 spaces.

听起来您想要${value?right_pad(8)}${value?left_pad(8)}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM