# Len - función de script y de gráfico

Len() devuelve la longitud de la cadena introducida.

Sintaxis:

Len(text)

Tipo de datos que devuelve: Entero

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

#### Ejemplo: expresión de gráfico

| Ejemplo | Resultado |
| --- | --- |
| `Len('Peter')` | Devuelve '5' |

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

#### Ejemplo: script de carga

```
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

| Cadena | NuevaCadena |
| --- | --- |
| this is a sample text string | This is a sample text string |
| capitalize first letter only | Capitalize first letter only |