CommandMessenger.IsEscaped Class Reference

Class for bookkeeping which characters in the stream are escaped. More...

## Public Member Functions

bool | EscapedChar (char currChar)
| Returns if the character is escaped. Note create new instance for every independent string More...

## Detailed Description

Class for bookkeeping which characters in the stream are escaped.

## Member Function Documentation

bool CommandMessenger.IsEscaped.EscapedChar | ( | char | currChar | ) |

inline

Returns if the character is escaped. Note create new instance for every independent string

Parameters

  currChar | The currebt character.

Returns
  true if the character is escaped, false if not.

References CommandMessenger.Escaping.EscapeCharacter.

{
bool escaped = (_lastChar == Escaping.EscapeCharacter);
_lastChar = currChar;
// special case: the escape char has been escaped:
if (_lastChar == Escaping.EscapeCharacter && escaped)
{
_lastChar = '\0';
}
return escaped;
}
CommandMessenger.Escaping.EscapeCharacter
static char EscapeCharacter
Gets the escape character.
Definition: Escaped.cs:68

The documentation for this class was generated from the following file:

- D:/My Documents/Github/Arduino-Code-and-Libraries/Libraries/CmdMessenger/CSharp/CommandMessenger/Escaped.cs