Raised This Month: $ Target: $400
 0% 

Solved new line char


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 07-20-2017 , 08:14   Re: new line char
Reply With Quote #1

Quote:
Originally Posted by KiLLeR. View Post
Thanks you, I forgot about this.
Code:
if(equal(text, "line1") // why this returns true if text contains actually a "line^n"
You could also use if (text[0] == EOS ...) .
EOS is for new line(empty).
DarthMan is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-20-2017 , 09:18   Re: new line char
Reply With Quote #2

Quote:
Originally Posted by DarthMan View Post
You could also use if (text[0] == EOS ...) .
EOS is for new line(empty).
Or simply
Code:
if( ! text[ 0 ] )
__________________
edon1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode