Text.SplitByLength
------------------

Split the text by length and returns a list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [15.1](newinversion151.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.SplitByLength"; Text { ; Length } ) 

**MBS**( **"Text.SplitByLength";** /\* Split the text by length and returns a list. \*/  
**$Text**; /\* The text to split.e.g. "Hello World" \*/   
**$Length**) /\* Optional; The block length.  
Defaults to 1.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text to split. | "Hello World" |  |
| Length | The block length.   Defaults to 1. | 2 | Optional |

### Result

Returns list or error.

### Description

Split the text by length and returns a list.  
### Examples

Split to list with one character:

 MBS ( "Text.SplitByLength"; "Hello World"; 1)  
<small>  
Example result:   
H  
e  
l  
l  
o  
   
W  
o  
r  
l  
d</small>Split with three characters:

 MBS ( "Text.SplitByLength"; "Hello World"; 3)  
<small>  
Example result:   
Hel  
lo   
Wor  
ld</small>### Release notes

- **Version 15.1**
    - Added [Text.SplitByLength](https://www.mbsplugins.eu/TextSplitByLength.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 15.1 News](https://www.mbsplugins.de/archive/2025-03-19/MBS_FileMaker_Plugin_151_News/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.1pr3](https://www.mbsplugins.de/archive/2025-02-12/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 12nd February 2025 , last changed 12nd February 2025

  
[Text.SoundExGerman](TextSoundExGerman.md) - [Text.Styles](TextStyles.md)

[HTML Version](TextSplitByLength.shtml)