爱意满满的作品展示区。
dorentus

[ Swift 2.0]闲着无聊写的一个给字符串包装 ANSI escape code 的玩具类

  •  
  •   dorentus · Jul 20, 2015 · 2220 views
    This topic created in 4127 days ago, the information mentioned may be changed or developed.

    https://gist.github.com/dorentus/f12294c7de7f4ed0e3d2

    Usage: print("Hello".red.bgcyan + " " + "World".underline)

    Demo: https://asciinema.org/a/dcy6zbdaletuibypz12fcdwlw

    应该可以拿来在命令行工具里面画画 ASCII Art 之类的吧……

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2390 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:13 · PVG 19:13 · LAX 03:13 · JFK 06:13
    ♥ Do have faith in what you're doing.