The ZX Ecosystem v5.1.0;_GUI_v3.1.0
Loading...
Searching...
No Matches
Namespaces | Functions
Character set of the ZXEcosystem

Description

These classes provide support for the character set of the ZXEcosystem.

NOTE:

-These classes are not thread-safe.

http://jafma.net

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Collaboration diagram for Character set of the ZXEcosystem:

Namespaces

namespace  zxeco
 The main namespace of the library, that spans across all the zx modules.
 

Functions

std::string zxeco::zxString (uint8_t cc)
 Return a string composed of the ZX control code CC (no arguments). More...
 
const std::string & zxeco::ctrlString (uint8_t c)
 Return a string representing the control code C. More...
 
std::string zxeco::nonCtrlString (const std::string &txt, char who='A')
 Return a version of TXT without control codes. More...
 

Function Documentation

◆ zxString()

std::string zxeco::zxString ( uint8_t  cc)
inline

#include <ZXChars.h>

Return a string composed of the ZX control code CC (no arguments).

Definition at line 121 of file ZXChars.h.

◆ ctrlString()

const std::string & zxeco::ctrlString ( uint8_t  c)

#include <ZXChars.h>

Return a string representing the control code C.

If C is not a control code, return empty string.

◆ nonCtrlString()

std::string zxeco::nonCtrlString ( const std::string &  txt,
char  who = 'A' 
)

#include <ZXChars.h>

Return a version of TXT without control codes.

If WHO == 'L', just remove location control codes (AT, TAB, COMMA, ENTER, DELETE, ARROWS), but not color control codes; if WHO == 'C', removes all color codes but not location ones; in any other case, removes all control codes. Notice that in all cases codes below 32 that are not control are kept.