Ola
I kindly request a code snipppet that, provided a very long paragraph, it can return the paragraph but each sentence equal in length without breaking words.
For example..
Then
will return
As you can see, "is a" is two words but because they are less or equal to five characters, they build their own sentence. Whilst 1234567899 is more than 5 characters, it should not be broken as it is one word.
Thanks..
I kindly request a code snipppet that, provided a very long paragraph, it can return the paragraph but each sentence equal in length without breaking words.
For example..
B4X:
Sub BreakStringInEqualLength(para as string, paralen as int) as string
....
...
End Sub
Then
B4X:
Dim eqLen as string = BreakStringInEqualLength("12 andizi kule ndawo 1234567899 a value is a string jhjkd hfkjhksj khshfks",5)
will return
B4X:
12
andizi
kule
ndawo
1234567899
a
value
is a
string
.....
As you can see, "is a" is two words but because they are less or equal to five characters, they build their own sentence. Whilst 1234567899 is more than 5 characters, it should not be broken as it is one word.
Thanks..