-3

Hello i want to get the ultil the space in line occur for example

picture

in the given picture am able to get the whole string using getter method to my parent window but i dont want get the date time part am currently getting

https://www.youtube.com/watch?v=VXw6OdVmMpw                    Sun Nov 1 20:29:30 2015

while i want get https://www.youtube.com/watch?v=VXw6OdVmMpw

can anyone help me i used Qstring left right but i cant get it working properly.

m.s.
  • 16,063
  • 7
  • 53
  • 88

1 Answers1

2
//QString Input holds your data...
QString Output = Input.section(' ', 0, 0);

section sees the string as fields seperated by a seperator character (' ' in this case) and returns the section from the given start section (0) upto and including the end section (0).

Assuming the white space in your inputstring is really spaces, if it is not, change ' ' to the correct seperator character.

Unimportant
  • 2,076
  • 14
  • 19