# StringUtils

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/utils/struct-stringutils/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct StringUtils
```

Word and line navigation over UTF-16 text.

Every index is a UTF-16 code unit index, and every character test looks
at a single code unit, as the reference does.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L14)

## Members

- [`is_eol`](#function-is_eol)
- [`is_start_of_word`](#function-is_start_of_word)
- [`is_end_of_word`](#function-is_end_of_word)
- [`previous_word`](#function-previous_word)
- [`next_word`](#function-next_word)

<a id="function-is_eol"></a>

### is_eol

```rust
fn is_eol(c: u16) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L17)

<a id="function-is_start_of_word"></a>

### is_start_of_word

```rust
fn is_start_of_word(text: &[u16], index: i32) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L21)

<a id="function-is_end_of_word"></a>

### is_end_of_word

```rust
fn is_end_of_word(text: &[u16], index: i32) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L45)

<a id="function-previous_word"></a>

### previous_word

```rust
fn previous_word(text: &[u16], cursor: i32) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L73)

<a id="function-next_word"></a>

### next_word

```rust
fn next_word(text: &[u16], cursor: i32) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/string_utils.rs#L111)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
