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.
added 2 characters in body
Source Link
Chankey Pathak
  • 21.8k
  • 12
  • 88
  • 138

I want to break a string into towtwo lines, but the line should not break into two, at the half of a word.How How can iI do this?

The string format is like this:

var words="value.eight.seven.six.five.four.three" 

expectedExpected output is:

"value.eight.seven. six.five.four.three" 

I want to break a string into tow lines, but the line should not break into two, at the half of a word.How can i do this?

The string format is like this

var words="value.eight.seven.six.five.four.three" 

expected output is:

"value.eight.seven. six.five.four.three" 

I want to break a string into two lines, but the line should not break into two, at the half of a word. How can I do this?

The string format is like this:

var words="value.eight.seven.six.five.four.three" 

Expected output is:

"value.eight.seven. six.five.four.three" 
deleted 6 characters in body
Source Link
Shaunak D
  • 20.7k
  • 10
  • 48
  • 79

I want to break a string into tow lines, but the line should not break into two, at the half of a word.How can i do this?

The string format is like this

var words="value.eight.seven.six.five.four.three" 

expected output is:"value.eight.seven. six.five.four.three"

"value.eight.seven. six.five.four.three" 

I want to break a string into tow lines, but the line should not break into two, at the half of a word.How can i do this?

The string format is like this

var words="value.eight.seven.six.five.four.three" 

expected output is:"value.eight.seven. six.five.four.three"

I want to break a string into tow lines, but the line should not break into two, at the half of a word.How can i do this?

The string format is like this

var words="value.eight.seven.six.five.four.three" 

expected output is:

"value.eight.seven. six.five.four.three" 
Source Link
Krishna
  • 1.4k
  • 5
  • 20
  • 36

Break the string into two lines

I want to break a string into tow lines, but the line should not break into two, at the half of a word.How can i do this?

The string format is like this

var words="value.eight.seven.six.five.four.three" 

expected output is:"value.eight.seven. six.five.four.three"