Skip to main content
Spelt myself right.
Source Link
emanresu A
  • 46.2k
  • 5
  • 112
  • 257

JavaScript (V8), 380 354 329 bytes

-25 thanks to AUsernanme@A username

t=>` ${"_".repeat(m=Math.max(...(l=t.split` `).map(d=>d.length)))}__ ${"/<"[j=+!l[1]]} ${l.shift().padEnd(m)} ${"\\>"[j]} ${j?'':l.map(d=>"|\\"[w=+!l[++j]]+' '+d.padEnd(m)+' '+"|/"[w]).join` `+` `} `+"-".repeat(m+2)+` \\ ^__^ \\ (oo)\\_______ (__)\\${n=' '})\\/\\ ${n}||----w | ${n}|| ||`.replace(/\n/g,` `+n) 

Try it online!

JavaScript (V8), 380 354 329 bytes

-25 thanks to AUsernanme

t=>` ${"_".repeat(m=Math.max(...(l=t.split` `).map(d=>d.length)))}__ ${"/<"[j=+!l[1]]} ${l.shift().padEnd(m)} ${"\\>"[j]} ${j?'':l.map(d=>"|\\"[w=+!l[++j]]+' '+d.padEnd(m)+' '+"|/"[w]).join` `+` `} `+"-".repeat(m+2)+` \\ ^__^ \\ (oo)\\_______ (__)\\${n=' '})\\/\\ ${n}||----w | ${n}|| ||`.replace(/\n/g,` `+n) 

Try it online!

JavaScript (V8), 380 354 329 bytes

-25 thanks to @A username

t=>` ${"_".repeat(m=Math.max(...(l=t.split` `).map(d=>d.length)))}__ ${"/<"[j=+!l[1]]} ${l.shift().padEnd(m)} ${"\\>"[j]} ${j?'':l.map(d=>"|\\"[w=+!l[++j]]+' '+d.padEnd(m)+' '+"|/"[w]).join` `+` `} `+"-".repeat(m+2)+` \\ ^__^ \\ (oo)\\_______ (__)\\${n=' '})\\/\\ ${n}||----w | ${n}|| ||`.replace(/\n/g,` `+n) 

Try it online!

added 16 characters in body
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180

JavaScript (V8), 380 354354 329 bytes

-25 thanks to AUsernanme

t=>` ${"_".repeat((m=Math.max(...(l=t.split` `).map(d=>d.length)))+2)}__ ${"<"/"[j=+(1 in l)]<"[j=+!l[1]]} ${l.shift().padEnd(m)} ${">\\"[j]"\\>"[j]} ${j?'':l.map(d=>`${"\\|"[w=+(j++<l.length)]}d=>"|\\"[w=+!l[++j]]+' ${d'+d.padEnd(m)}+' ${"'+"|/|"[w]}`"[w]).join(`join` `)+``+` `:""} ${"`+"-".repeat(m+2)}${`+` \\ ^__^ \\ (oo)\\_______ (__)\\\\${n=' '})\\/\\   ${n}||----w |   ${n}|| ||`.replace(/\n/g,`  ``+n)}` 

Try it online!Try it online!

JavaScript (V8), 380 354 bytes

t=>` ${"_".repeat((m=Math.max(...(l=t.split` `).map(d=>d.length)))+2)} ${"</"[j=+(1 in l)]} ${l.shift().padEnd(m)} ${">\\"[j]} ${j?l.map(d=>`${"\\|"[w=+(j++<l.length)]} ${d.padEnd(m)} ${"/|"[w]}`).join(` `)+` `:""} ${"-".repeat(m+2)}${` \\ ^__^ \\ (oo)\\_______ (__)\\ )\\/\\   ||----w |   || ||`.replace(/\n/g,`  `)}` 

Try it online!

JavaScript (V8), 380 354 329 bytes

-25 thanks to AUsernanme

t=>` ${"_".repeat(m=Math.max(...(l=t.split` `).map(d=>d.length)))}__ ${"/<"[j=+!l[1]]} ${l.shift().padEnd(m)} ${"\\>"[j]} ${j?'':l.map(d=>"|\\"[w=+!l[++j]]+' '+d.padEnd(m)+' '+"|/"[w]).join` `+` `} `+"-".repeat(m+2)+` \\ ^__^ \\ (oo)\\_______ (__)\\${n=' '})\\/\\ ${n}||----w | ${n}|| ||`.replace(/\n/g,` `+n) 

Try it online!

added 11 characters in body
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180

JavaScript (V8), 380 354 bytes

t=>` ${"_".repeat((m=Math.max(...(l=t.split` `).map(d=>d.length)))+2)} ${"</"[j=+(1 in l)]} ${l.shift().padEnd(m)} ${">\\"[j]} ${j?l.map(d=>`${"\\|"[w=+(j++<l.length)]} ${d.padEnd(m)} ${"/|"[w]}`).join(` `)+` `:""} ${"-".repeat(m+2)}${` \\ ^__^ \\ (oo)\\_______ (__)\\ )\\/\\ ||----w | || ||`.replace(/\n/g,` `)}` 

Try it online!

JavaScript (V8), 354 bytes

t=>` ${"_".repeat((m=Math.max(...(l=t.split` `).map(d=>d.length)))+2)} ${"</"[j=+(1 in l)]} ${l.shift().padEnd(m)} ${">\\"[j]} ${j?l.map(d=>`${"\\|"[w=+(j++<l.length)]} ${d.padEnd(m)} ${"/|"[w]}`).join(` `)+` `:""} ${"-".repeat(m+2)}${` \\ ^__^ \\ (oo)\\_______ (__)\\ )\\/\\ ||----w | || ||`.replace(/\n/g,` `)}` 

Try it online!

JavaScript (V8), 380 354 bytes

t=>` ${"_".repeat((m=Math.max(...(l=t.split` `).map(d=>d.length)))+2)} ${"</"[j=+(1 in l)]} ${l.shift().padEnd(m)} ${">\\"[j]} ${j?l.map(d=>`${"\\|"[w=+(j++<l.length)]} ${d.padEnd(m)} ${"/|"[w]}`).join(` `)+` `:""} ${"-".repeat(m+2)}${` \\ ^__^ \\ (oo)\\_______ (__)\\ )\\/\\ ||----w | || ||`.replace(/\n/g,` `)}` 

Try it online!

deleted 653 characters in body
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180
Loading
deleted 11 characters in body
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180
Loading
added 18 characters in body
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180
Loading
Source Link
rydwolf
  • 19.3k
  • 2
  • 90
  • 180
Loading