CmdMessenger 3.0 CmdMessenger is a serial port messaging library for the Arduino

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions | List of all members
CommandMessenger.StringUtils Class Reference

String utilities. More...

## Static Public Member Functions
static string | ConvertEncoding (string input, Encoding fromEncoding, Encoding toEncoding)
| Convert string from one codepage to another. More...

## Detailed Description

String utilities.

## Member Function Documentation

static string CommandMessenger.StringUtils.ConvertEncoding | ( | string | input,
|  | Encoding | fromEncoding,
|  | Encoding | toEncoding
| ) |  |
| inline static

Convert string from one codepage to another.

Parameters

  input | The string.
  fromEncoding | input encoding codepage.
  toEncoding | output encoding codepage.

Returns
  .

35 {
36 var byteArray = fromEncoding.GetBytes(input);
37 var asciiArray = Encoding.Convert(fromEncoding, toEncoding, byteArray);
38 var finalString = toEncoding.GetString(asciiArray);
39 return finalString;
40 }

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

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