Use const str parameters.

This is a more reasonable approach.
This commit is contained in:
yamadapc 2014-07-12 19:32:26 -03:00
parent 9f4fddd188
commit 5f944fad66

View file

@ -83,8 +83,12 @@ static enum mode : int
* ---
*/
string colorize(string str, fg c=fg.init, bg b=bg.init, mode m=mode.init)
pure
string colorize(
const string str,
const fg c=fg.init,
const bg b=bg.init,
const mode m=mode.init
) pure
{
return format("\033[%d;%d;%dm%s\033[0m", m, c, b, str);
}