# StringExtensionMethods.RemoveWhiteSpace examples

Examples for [RemoveWhiteSpace](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.stringextensionmethods/removewhitespace.md) in Grasshopper2.Extensions.StringExtensionMethods.

## C#

```cs
using Grasshopper2.Extensions;

// As an extension method
string result = text.RemoveWhiteSpace(allowedRunLength);

// As a static method
result = StringExtensionMethods.RemoveWhiteSpace(text, allowedRunLength);
```

## Python

```python
import clr
clr.AddReference('Grasshopper2')
import Grasshopper2.Extensions
clr.ImportExtensions(Grasshopper2.Extensions)

# As an extension method
result = text.RemoveWhiteSpace(allowed_run_length)

# As a static method
result = Grasshopper2.Extensions.StringExtensionMethods.RemoveWhiteSpace(text, allowed_run_length)
```
