How do I r开发者_JS百科emove line 1,2,3 and retain line 4?
Like:
- Programmer
- Business Owner
- Manager
- Marketer
you can split on linebreaks (\r and \n), then grab the last element:
textfield.text = textfield.text.split(/[\r\n]/gm).pop();
How do I r开发者_JS百科emove line 1,2,3 and retain line 4?
Like:
you can split on linebreaks (\r and \n), then grab the last element:
textfield.text = textfield.text.split(/[\r\n]/gm).pop();
精彩评论