# Len - script- en diagramfunctie

Len() retourneert de lengte van de invoertekenreeks.

Syntaxis:

Len(text)

Retourgegevenstypen: geheel getal

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

#### Voorbeeld: diagramuitdrukking

| Voorbeeld | Resultaat |
| --- | --- |
| `Len('Peter')` | Retourneert '5' |

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

#### Voorbeeld: load-script

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

Resultaat

| Tekenreeks | NieuweTekenreeks |
| --- | --- |
| this is a sample text string | This is a sample text string |
| capitalize first letter only | Capitalize first letter only |