Skip to main content
Commonmark migration
Source Link

#Introduction

Introduction

I think everyone agrees that nice pictures have to have a nice frame. But most challenges on this site about ASCII-Art just want the raw picture and don't care about it's preservation.
Wouldn't it be nice if we had a program that takes some ASCII-Art and surrounds it with a nice frame?

#The Challenge

The Challenge

Write a program that takes some ASCII-Art as input and outputs it surrounded by a nice frame.

Example:

*****
 ***
  *
 ***
*****

becomes

╔═══════╗
║ ***** ║
║  ***  ║
║   *   ║
║  ***  ║
║ ***** ║
╚═══════╝
  • You have to use the exact same characters for the frame as in the example: ═ ║ ╔ ╗ ╚ ╝
  • The top and the bottom of the frame get inserted before the first and after the last line of the input.
  • The left and rights parts of the frame have to have exact one space padding to the widest line of the input.
  • There may be no leading or trailing whitespaces in the output. Only a trailing newline is allowed.
  • You may assume that the input has no unnecessary leading whitespaces.
  • You may assume that the input has no trailing whitespaces on any line.
  • You don't have to handle empty input.
  • The input will only contain printable ASCII-characters and newlines.

#Rules

Rules

Happy Coding!

Using some great ASCII-Art, that was produced in any challenge on this site, as input to your program and showing it with a nice frame is highly encouraged!

#Introduction

I think everyone agrees that nice pictures have to have a nice frame. But most challenges on this site about ASCII-Art just want the raw picture and don't care about it's preservation.
Wouldn't it be nice if we had a program that takes some ASCII-Art and surrounds it with a nice frame?

#The Challenge

Write a program that takes some ASCII-Art as input and outputs it surrounded by a nice frame.

Example:

*****
 ***
  *
 ***
*****

becomes

╔═══════╗
║ ***** ║
║  ***  ║
║   *   ║
║  ***  ║
║ ***** ║
╚═══════╝
  • You have to use the exact same characters for the frame as in the example: ═ ║ ╔ ╗ ╚ ╝
  • The top and the bottom of the frame get inserted before the first and after the last line of the input.
  • The left and rights parts of the frame have to have exact one space padding to the widest line of the input.
  • There may be no leading or trailing whitespaces in the output. Only a trailing newline is allowed.
  • You may assume that the input has no unnecessary leading whitespaces.
  • You may assume that the input has no trailing whitespaces on any line.
  • You don't have to handle empty input.
  • The input will only contain printable ASCII-characters and newlines.

#Rules

Happy Coding!

Using some great ASCII-Art, that was produced in any challenge on this site, as input to your program and showing it with a nice frame is highly encouraged!

Introduction

I think everyone agrees that nice pictures have to have a nice frame. But most challenges on this site about ASCII-Art just want the raw picture and don't care about it's preservation.
Wouldn't it be nice if we had a program that takes some ASCII-Art and surrounds it with a nice frame?

The Challenge

Write a program that takes some ASCII-Art as input and outputs it surrounded by a nice frame.

Example:

*****
 ***
  *
 ***
*****

becomes

╔═══════╗
║ ***** ║
║  ***  ║
║   *   ║
║  ***  ║
║ ***** ║
╚═══════╝
  • You have to use the exact same characters for the frame as in the example: ═ ║ ╔ ╗ ╚ ╝
  • The top and the bottom of the frame get inserted before the first and after the last line of the input.
  • The left and rights parts of the frame have to have exact one space padding to the widest line of the input.
  • There may be no leading or trailing whitespaces in the output. Only a trailing newline is allowed.
  • You may assume that the input has no unnecessary leading whitespaces.
  • You may assume that the input has no trailing whitespaces on any line.
  • You don't have to handle empty input.
  • The input will only contain printable ASCII-characters and newlines.

Rules

Happy Coding!

Using some great ASCII-Art, that was produced in any challenge on this site, as input to your program and showing it with a nice frame is highly encouraged!

replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
replaced http://meta.codegolf.stackexchange.com/ with https://codegolf.meta.stackexchange.com/
Source Link
Loading
Tweeted twitter.com/StackCodeGolf/status/704140599193169924
added 73 characters in body
Source Link
Denker
  • 6.9k
  • 1
  • 24
  • 66
Loading
added 42 characters in body
Source Link
Denker
  • 6.9k
  • 1
  • 24
  • 66
Loading
Source Link
Denker
  • 6.9k
  • 1
  • 24
  • 66
Loading