## String::Trim() const method


Removes all whitespace characters from both beginning and end of the string.

```cpp
String System::String::Trim() const
```


### ReturnValue

[String](../) with no whitespaces at beginning or end.

## See Also

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
## String::Trim(char_t) const method


Removes all occurrences of passed character from both beginning and end of the string.

```cpp
String System::String::Trim(char_t ch) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| ch | char_t | Symbol to remove. |

### ReturnValue

Removal result.

## See Also

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
## String::Trim(const ArrayPtr\<char_t\>\&) const method


Removes all occurrences of passed characters from both beginning and end of the string.

```cpp
String System::String::Trim(const ArrayPtr<char_t> &anyOf) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| anyOf | const ArrayPtr\<char_t\>\& | [Array](../../array/) of characters to remove. |

### ReturnValue

[String](../) without removed characters.

## See Also

* Class [String](../)
* Typedef [ArrayPtr](../../arrayptr/)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
## String::Trim(const String\&) const method


Removes all occurrences of passed characters from both beginning and end of the string.

```cpp
String System::String::Trim(const String &anyOf) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| anyOf | const String\& | [String](../) of characters to remove. |

### ReturnValue

[String](../) without removed characters.

## See Also

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
