Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    what is your expected O/P..? What do you mean by two lines..? want to store the split values into two variables.. Commented Jun 26, 2014 at 5:12
  • you want to break string but still don't want to break in two. It is little confusing. Is it that you want to break it in two halfs but words should not break? Commented Jun 26, 2014 at 5:13
  • you have to be more specific. what is the point at which you want to break the string?? Commented Jun 26, 2014 at 5:15
  • Check this out: stackoverflow.com/questions/14484787/wrap-text-in-javascript It is similar to your issue, just need to change the identifier to break the line accordingly. Commented Jun 26, 2014 at 5:15
  • @ Bhushan Kawadkar:i mean the line should not break at middle of "seven", or "six", means it should break after the third word or the fourth word Commented Jun 26, 2014 at 5:16