ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:stripcolorcodes

StripColorCodes

str StripColorCodes(str s)

Description

Removes all colorcodes from the string and returns the result.

Examples

StripColorCodes("\cghello") -> "hello"
StripColorCodes("hello\cg\cb\c[red]hello") -> "hellohello"

Use it to strip colorcodes from player names:

print(s:StripColorCodes(PlayerName(X)));
functions/stripcolorcodes.txt · Last modified: 2017/07/09 17:49 by korshun