# Applying different values to string row

This must be easy but I'm stuck, I want to create this row:

{< 1 >}{< 4 >}{< 4 >}{< 22 >}{< 3 >}{< 12 >}{< 54 >}{< 65 >}

from this list

t = {1, 4, 4, 22, 3, 12, 54, 65};


I tried many things like

d = "{<" t[[i]] ">}";
t = {1, 4, 4, 22, 3, 12, 54, 65};
Row[Table[d, {i, 1, 8}]]


but nothing works

t = {1, 4, 4, 22, 3, 12, 54, 65}


Other ways:

StringRiffle[t, {"{<", ">}{<", ">}"}]

StringJoin[StringTemplate@"{<>}" /@ t]


And similar but not the same:

Row[List /@ Skeleton /@ t] • The second one is a very good approach because I can manipulate/change the pattern easily – J42161217 May 8 '17 at 11:37
• @Kuba thanks for introducing me to StringRiffle...guess I should have known about it...:) – ubpdqn May 8 '17 at 11:39

Perhaps:

t = {1, 4, 4, 22, 3, 12, 54, 65};
a = ">}{<"
Row[{"{<"}~Join~Riffle[t, a]~Join~{">}"}]


or

l = "{<";
r = ">}";
Row[{l, ##, r} & @@ Riffle[t, Row[{r, l}]]]


In:

(*Method 1*)
xs = {1, 4, 4, 22, 3, 12, 54, 65};
box = Function[x, "{<" ~~ ToString[x] ~~ ">}", Listable];
StringJoin@box@xs

(*Method 2*)
rules =  {"{" -> "{<", ", " -> ">}{<", "}" -> ">}"}
xs // ToString // StringReplace[#, rules] &

(*Method 3*)
textString = TextString[{#}, ListFormat -> {"{<", "", ">}"}] &;
xs // Map[textString] // StringJoin


Out:

{<1>}{<4>}{<4>}{<22>}{<3>}{<12>}{<54>}{<65>}
{<1>}{<4>}{<4>}{<22>}{<3>}{<12>}{<54>}{<65>}
{<1>}{<4>}{<4>}{<22>}{<3>}{<12>}{<54>}{<65>}