Utility class for transforming strings.
More...
#include <transform.h>
Utility class for transforming strings.
◆ appendCharacterReference()
| void log4cxx::helpers::Transform::appendCharacterReference |
( |
LogString & | buf, |
|
|
unsigned int | ch ) |
|
static |
Add ch to buf as an XML character reference.
- Parameters
-
| buf | output stream holding the XML data to this point. |
| ch | the value to encode as a XML character reference |
◆ appendEscapingCDATA()
| void log4cxx::helpers::Transform::appendEscapingCDATA |
( |
LogString & | buf, |
|
|
const LogString & | input ) |
|
static |
Add input to buf while ensuring embedded CDEnd strings (]]>) are handled properly within the message.
The initial CDStart (<![CDATA[) and terminating CDEnd (]]>) of the CDATA section must be added by the calling method. Any NUL character in input is not copied to buf. A character reference is used in place of a character whose value is not permitted by the XML 1.0 specification.
- Parameters
-
| buf | Transformed input text is added to this. |
| input | The text to be appended to buf |
◆ appendEscapingTags()
| void log4cxx::helpers::Transform::appendEscapingTags |
( |
LogString & | buf, |
|
|
const LogString & | input ) |
|
static |
Add input, which may contain HTML tags (ie, <b>, <table>, etc) to buf while replacing any '<' and '>' characters with respective predefined entity references.
Any NUL character in input is not copied to buf. A character reference is used in place of a character whose value is not permitted by the XML 1.0 specification.
- Parameters
-
| buf | output stream where to write the modified string. |
| input | The text to be converted. |
◆ appendLegalCharacters()
| void log4cxx::helpers::Transform::appendLegalCharacters |
( |
LogString & | buf, |
|
|
const LogString & | input ) |
|
static |
Append a transformation of input onto buf.
Only the valid XML 1.0 specification characters (#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]) are copied to buf. Any special character (<, >, & and ") is replaced with an entity reference.
- Parameters
-
| buf | Transformed input text is added to this. |
| input | The text to be transformed. |
The documentation for this class was generated from the following file: