# Len – função de script e gráfico

Len() retorna o comprimento da cadeia de caracteres de entrada.

Sintaxe:

Len(text)

Tipo de dados de retorno: inteiro

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Len.htm)

#### Exemplo: expressão de gráfico

| Exemplo | Resultado |
| --- | --- |
| `Len('Peter')` | Retorna '5' |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Len.htm)

#### Exemplo: script de carregamento

```
T1:
Load String, First&Second as NewString;
Load *, mid(String,len(First)+1) as Second;
Load *, upper(left(String,1)) as First;
Load  * inline [
String
this is a sample text string
capitalize first letter only ]; 
				
```

Resultado

| Cadeia | NewString |
| --- | --- |
| this is a sample text string | This is a sample text string |
| capitalize first letter only | Capitalize first letter only |