# SpanIncluding()

Gets characters from a string, from the beginning to a character that is not in a specified set of characters.

The search is case-sensitive.

```
SpanIncluding( string=string, set=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| string | string | Yes | A string or a variable that contains the search string. |  |
| set | string | Yes | A string or a variable that contains a set of characters. Must contain one or more characters |  |

# Examples

```cfml
writeDump(spanIncluding("Plant green! save earth!", "Plant green!r"));
//Member Function
str="AabByyysss";
writeDump(str.spanIncluding("AabBz"));
```







# Categories

[Strings](../../categories/string.md)

# See Also

[string.spanIncluding()](../objects/string/spanincluding.md)