Say i have a simple sentence as below.
For example, this is what have:
A simple sentence consists of only one clause. A compound sentence consists of two or more independent clauses. A complex sentence has at least one independent clause plus at least one dependent clause. A set of words with no independent clause may be an incomplete sentence, also called a sentence fragment.
I want only first 10 words in the sentence above.
I'm trying to produce the following string:
A simple sentence consists of only one clause. A compound
I tried this:
bigString.split(" " ,10).toString()
But it returns the same bigString
wrapped with []
array.
Thanks in advance.