Show / Hide Table of Contents

# Class Sanitizer

Sanitize strings to remove soft hyphens and other special characters.

##### Inheritance

System.Object
Sanitizer

##### Implements

ISanitizer

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Dalamud.Game.Text.Sanitizer

###### Assembly: Dalamud.dll

##### Syntax

    public class Sanitizer : ISanitizer

### Constructors

| Improve this Doc View Source

#### Sanitizer(ClientLanguage)

Initializes a new instance of the Sanitizer class.

##### Declaration

    public Sanitizer(ClientLanguage defaultClientLanguage)

##### Parameters

Type | Name | Description
--- | --- | ---
ClientLanguage | defaultClientLanguage | Default clientLanguage for sanitizing strings.

### Methods

| Improve this Doc View Source

#### Sanitize(IEnumerable<String>)

Creates a list of sanitized strings using current clientLanguage.

##### Declaration

    public IEnumerable<string> Sanitize(IEnumerable<string> unsanitizedStrings)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<System.String> | unsanitizedStrings | List of unsanitized string to sanitize.

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<System.String> | A list of sanitized strings.

| Improve this Doc View Source

#### Sanitize(IEnumerable<String>, ClientLanguage)

Creates a list of sanitized strings using requested clientLanguage.

##### Declaration

    public IEnumerable<string> Sanitize(IEnumerable<string> unsanitizedStrings, ClientLanguage clientLanguage)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<System.String> | unsanitizedStrings | List of unsanitized string to sanitize.
ClientLanguage | clientLanguage | Target language for sanitized strings.

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<System.String> | A list of sanitized strings.

| Improve this Doc View Source

#### Sanitize(String)

Creates a sanitized string using current clientLanguage.

##### Declaration

    public string Sanitize(string unsanitizedString)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | unsanitizedString | An unsanitized string to sanitize.

##### Returns

Type | Description
--- | ---
System.String | A sanitized string.

| Improve this Doc View Source

#### Sanitize(String, ClientLanguage)

Creates a sanitized string using request clientLanguage.

##### Declaration

    public string Sanitize(string unsanitizedString, ClientLanguage clientLanguage)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | unsanitizedString | An unsanitized string to sanitize.
ClientLanguage | clientLanguage | Target language for sanitized strings.

##### Returns

Type | Description
--- | ---
System.String | A sanitized string.

### Implements

ISanitizer