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

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