C# Class Gnu.Inet.Encoding.Stringprep

This class offers static methods for preparing internationalized strings. It supports the following stringprep profiles:
  • RFC3491 nameprep
  • RFC3920 XMPP nodeprep and resourceprep
Note that this implementation only supports 16-bit Unicode code points.
Exibir arquivo Open project: pexip/os-libidn Class Usage Examples

Public Methods

Method Description
NamePrep ( string input ) : string

Preps a name according to the Stringprep profile defined in RFC3491. Unassigned code points are not allowed. *

NamePrep ( string input, bool allowUnassigned ) : string

Preps a name according to the Stringprep profile defined in RFC3491. *

NodePrep ( string input ) : string

Preps a node name according to the Stringprep profile defined in RFC3920. Unassigned code points are not allowed. *

NodePrep ( string input, bool allowUnassigned ) : string

Preps a node name according to the Stringprep profile defined in RFC3920.

ResourcePrep ( string input ) : string

Preps a resource name according to the Stringprep profile defined in RFC3920. Unassigned code points are not allowed.

ResourcePrep ( string input, bool allowUnassigned ) : string

Preps a resource name according to the Stringprep profile defined in RFC3920.

Private Methods

Method Description
Contains ( StringBuilder s, char p ) : bool
Contains ( char c, char p ) : bool
Filter ( StringBuilder s, char f ) : void
Map ( StringBuilder s, char search, string replace ) : void

Method Details

NamePrep() public static method

Preps a name according to the Stringprep profile defined in RFC3491. Unassigned code points are not allowed. *
public static NamePrep ( string input ) : string
input string the name to prep. ///
return string

NamePrep() public static method

Preps a name according to the Stringprep profile defined in RFC3491. *
public static NamePrep ( string input, bool allowUnassigned ) : string
input string the name to prep. ///
allowUnassigned bool true if the name may contain unassigned /// code points. ///
return string

NodePrep() public static method

Preps a node name according to the Stringprep profile defined in RFC3920. Unassigned code points are not allowed. *
public static NodePrep ( string input ) : string
input string the node name to prep. ///
return string

NodePrep() public static method

Preps a node name according to the Stringprep profile defined in RFC3920.
public static NodePrep ( string input, bool allowUnassigned ) : string
input string the node name to prep. ///
allowUnassigned bool true if the node name may contain /// unassigned code points. ///
return string

ResourcePrep() public static method

Preps a resource name according to the Stringprep profile defined in RFC3920. Unassigned code points are not allowed.
public static ResourcePrep ( string input ) : string
input string the resource name to prep. ///
return string

ResourcePrep() public static method

Preps a resource name according to the Stringprep profile defined in RFC3920.
public static ResourcePrep ( string input, bool allowUnassigned ) : string
input string the resource name to prep. ///
allowUnassigned bool true if the resource name may contain /// unassigned code points. ///
return string