Menu

#3 Formatted strings

open
Basic (7)
8
2010-12-26
2010-12-26
No

Develop a method to print on terminal a formatted strings.

At first, this should be using html-like tags:

<u> underline
<b> bold
<l> blink
<h> half-bright
<f> full-bright
<r> reset attributes
<i> reverse colors

<D> black foreground color
<R> red foreground color
<G> green foreground color
<O> brown foreground color
<B> blue foreground color
<M> magenta foreground color
<C> cyan foreground color
<W> white foreground color

Additionaly, adding a B, will set for background color.

<DB> black background colo
<RB> red backgroung color

To close a tag:

</D> stop black foreground color

<<> <
<>> >

Example:

<R>This is an <b>example</b> text with <u>http://link</u><r>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.