2014-12-01 5 views

답변

4

이 라이브러리를 사용할 수 있습니다 2.11+는 스칼라를 사용하는 경우 : https://github.com/backuity/ansi-interpolator

그것은 컴파일 시간에 문자열을 변환하는 매크로를 사용하고, 지원

중첩 :

ansi"Text containing ansi tags such as %bold{bold text} or %underline{can be %yellow{nested}}" 

// you can also use string interpolation: 
val someMsg = "hey" 
ansi"My msg %bold{in bold: $someMsg}"