Split
(Created page with "In OCL the string split function gets expects a char - but ocl defaults single characters to string. To solve this you can go like this: SomeString.split('X'.toCharArray)")
 
No edit summary
Line 1: Line 1:
In OCL the string split function gets expects a char - but ocl defaults single characters to string. To solve this you can go like this:
In OCL the string split function gets expects a char - but ocl defaults single characters to string. To solve this you can go like this:
SomeString.split('X'.toCharArray)
SomeString.split('X'.toCharArray)
This text SomeString.split('X') will give you the error: 31:System.String does not conform to Collection(System.Char)

Revision as of 07:23, 2 May 2017

In OCL the string split function gets expects a char - but ocl defaults single characters to string. To solve this you can go like this:

SomeString.split('X'.toCharArray)

This text SomeString.split('X') will give you the error: 31:System.String does not conform to Collection(System.Char)

This page was edited 94 days ago on 02/10/2024. What links here