Left_pad and right_pad in freemarker
1. Simple Description
(1) left_pad left
(2) The right side of the right_pad
(3) when there is only one parameter, blank is inserted; when there are two parameters, the second parameter symbol is inserted; if the length of the second parameter is greater than 1, this symbol is periodically inserted.
2. Examples
<# -- Left_pad in freemarker is left-side --> [$ {""? Left_pad (8)}] [$ {"E "? Left_pad (8)}] [$ {"EF "? Left_pad (8)}] [$ {"EFG "? Left_pad (8)}] [$ {"EFGH "? Left_pad (8)}] [$ {"EFGHI "? Left_pad (8)}] [$ {"EFGHIJ "? Left_pad (8)}] [$ {"EFGHIJK "? Left_pad (8)}] [$ {"EFGHIJKL "? Left_pad (8)}] [$ {""? Left_pad (8, "*")}] [$ {"E "? Left_pad (8, "*")}] [$ {"EF "? Left_pad (8, "*")}] [$ {"EFG "? Left_pad (8, "*")}] [$ {"EFGH "? Left_pad (8, "*")}] [$ {"EFGHI "? Left_pad (8, "*")}] [$ {"EFGHIJ "? Left_pad (8, "*")}] [$ {"EFGHIJK "? Left_pad (8, "*")}] [$ {"EFGHIJKL "? Left_pad (8, "*")}] [$ {""? Left_pad (8 ,"? *? ")}] [$ {" E "? Left_pad (8 ,"? *? ")}] [$ {" EF "? Left_pad (8 ,"? *? ")}] [$ {" EFG "? Left_pad (8 ,"? *? ")}] [$ {" EFGH "? Left_pad (8 ,"? *? ")}] [$ {" EFGHI "? Left_pad (8 ,"? *? ")}] [$ {" EFGHIJ "? Left_pad (8 ,"? *? ")}] [$ {" EFGHIJK "? Left_pad (8 ,"? *? ")}] [$ {" EFGHIJKL "? Left_pad (8 ,"? *? ")}] <# -- The right side of right_pad in freemarker --> [$ {""? Right_pad (8)}] [$ {"E "? Right_pad (8)}] [$ {"EF "? Right_pad (8)}] [$ {"EFG "? Right_pad (8)}] [$ {"EFGH "? Right_pad (8)}] [$ {"EFGHI "? Right_pad (8)}] [$ {"EFGHIJ "? Right_pad (8)}] [$ {"EFGHIJK "? Right_pad (8)}] [$ {"EFGHIJKL "? Right_pad (8)}] [$ {""? Right_pad (8, "*")}] [$ {"E "? Right_pad (8, "*")}] [$ {"EF "? Right_pad (8, "*")}] [$ {"EFG "? Right_pad (8, "*")}] [$ {"EFGH "? Right_pad (8, "*")}] [$ {"EFGHI "? Right_pad (8, "*")}] [$ {"EFGHIJ "? Right_pad (8, "*")}] [$ {"EFGHIJK "? Right_pad (8, "*")}] [$ {"EFGHIJKL "? Right_pad (8, "*")}] [$ {""? Right_pad (8 ,"? *? ")}] [$ {" E "? Right_pad (8 ,"? *? ")}] [$ {" EF "? Right_pad (8 ,"? *? ")}] [$ {" EFG "? Right_pad (8 ,"? *? ")}] [$ {" EFGH "? Right_pad (8 ,"? *? ")}] [$ {" EFGHI "? Right_pad (8 ,"? *? ")}] [$ {" EFGHIJ "? Right_pad (8 ,"? *? ")}] [$ {" EFGHIJK "? Right_pad (8 ,"? *? ")}] [$ {" EFGHIJKL "? Right_pad (8 ,"? *? ")}]
3. Sample Results
[ ] [ E] [ EF] [ EFG] [ EFGH] [ EFGHI] [ EFGHIJ] [ EFGHIJK] [EFGHIJKL] [********] [*******E] [******EF] [*****EFG] [****EFGH] [***EFGHI] [**EFGHIJ] [*EFGHIJK] [EFGHIJKL] [?*??*??*] [?*??*??E] [?*??*?EF] [?*??*EFG] [?*??EFGH] [?*?EFGHI] [?*EFGHIJ] [?EFGHIJK] [EFGHIJKL] [ ] [E ] [EF ] [EFG ] [EFGH ] [EFGHI ] [EFGHIJ ] [EFGHIJK ] [EFGHIJKL] [********] [E*******] [EF******] [EFG*****] [EFGH****] [EFGHI***] [EFGHIJ**] [EFGHIJK*] [EFGHIJKL] [?*??*??*] [E*??*??*] [EF??*??*] [EFG?*??*] [EFGH*??*] [EFGHI??*] [EFGHIJ?*] [EFGHIJK*] [EFGHIJKL]