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
| ) |  |

inlinestatic

Convert string from one codepage to another.

Parameters

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

Returns
  .

{
var byteArray = fromEncoding.GetBytes(input);
var asciiArray = Encoding.Convert(fromEncoding, toEncoding, byteArray);
var finalString = toEncoding.GetString(asciiArray);
return finalString;
}

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