Raised This Month: $ Target: $400
 0% 

How to check ^ in name ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 07-22-2011 , 13:28   How to check ^ in name ?
Reply With Quote #1

Title ? I tryed with containi( szName, "^"" ) != -1 and doesn't work.
dFF is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-22-2011 , 14:09   Re: How to check ^ in name ?
Reply With Quote #2

PHP Code:
stock bool:StrHasChar(szString[], cChar)
{
    static 
ic
    i 
0
    
    
while((szString[i++]) != EOS)
    {
        if(
== cChar)
            
//szString[i-1] = ' '
            
return true;
    }
    return 
false;

I think that is:

Code:
if(StrHasChars(szName, '\^'))
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-22-2011 , 14:49   Re: How to check ^ in name ?
Reply With Quote #3

You are checking if there is a " in the string.


PHP Code:
containiszName"^^" ) != -
__________________
fysiks is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 07-22-2011 , 14:55   Re: How to check ^ in name ?
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You are checking if there is a " in the string.


PHP Code:
containiszName"^^" ) != -
invalid expression assumed zero
dFF is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-22-2011 , 14:57   Re: How to check ^ in name ?
Reply With Quote #5

Quote:
Originally Posted by dFF View Post
invalid expression assumed zero
Tested. I don't get that error.
__________________
fysiks is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 07-22-2011 , 15:05   Re: How to check ^ in name ?
Reply With Quote #6

Yep! You're right, file must be utf-8 without bom and complie fine. Thanks and thank you meTaLiCroSS for reply.
dFF 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 01:10.


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