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

# 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._
