---
schema_version: "1"
id: ff3bd8e6ee9919fd9e4fe00c2587fc3efbd655ac91a4d5d7a2fd9deaf93fa343
title: everyCharacter
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-strings-functions-everycharacter.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-strings-functions-everycharacter
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e59942e4a0a2133b85a7ed9292c9ecdbf0caf17757dced80ad5a3568b5bb1fa9
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# everyCharacter

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## everyCharacter(text: String, condition: (character: String) -> Boolean): Boolean

Checks whether a condition is valid for _every_ character in a string.

_Introduced in DataWeave version 2.4.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>text</code></p></td><td><p>The string to check.</p></td></tr><tr><td><p><code>condition</code></p></td><td><p>Expression that iterates through the characters in the string that it checks and returns a Boolean value.</p></td></tr></tbody></table>

### Example

This example determines whether a string is composed of only digits and spaces.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
"12 34  56" everyCharacter $ == " " or isNumeric($)
```

#### Output

```Json
true
```

## everyCharacter(text: Null, condition: (character: Nothing) -> Any): true

Helper function that enables `everyCharacter` to work with a `null` value.

_Introduced in DataWeave version 2.4.0._
