Mirage Source
http://www.miragesource.net/forums/

String Checks
http://www.miragesource.net/forums/viewtopic.php?f=183&t=5359
Page 1 of 53

Author:  Jacob [ Thu Apr 02, 2009 3:29 pm ]
Post subject:  String Checks

This is not my code, i found these examples. I don't remember where though...

Code:
Public Function IsAlpha(s As String) As Boolean
    If Not s Like "*[!A-Za-z]*" Then IsAlpha = True
End Function


Code:
Public Function IsAlphaNumeric(s As String) As Boolean
    If Not s Like "*[!0-9A-Za-z]*" Then IsAlphaNumeric = True
End Function


That's what I use in MR for our legal string checks.

Author:  William [ Thu Apr 02, 2009 3:32 pm ]
Post subject:  Re: String Checks

I have never seen that before, care to explain :P

Author:  genusis [ Thu Apr 02, 2009 3:43 pm ]
Post subject:  Re: String Checks

one only searches the string for capital a-z and lowercase a-z letters.

the other searches for 0-9 cap a-z and lowercase a-z letters based on how you want there names and passwords to be.

Much more accurate than the string check we have now.

Author:  Dragoons Master [ Fri Apr 03, 2009 11:24 pm ]
Post subject:  Re: String Checks

WOW!!!
I didn't know VB6 has regular expressions!
That really RLZ!
=D

Author:  William [ Sat Apr 04, 2009 1:03 am ]
Post subject:  Re: String Checks

But I never seen "!" used in a application language :S Dugor, care to explain how it works?

Author:  Coke [ Sat Apr 04, 2009 1:13 am ]
Post subject:  Re: String Checks

Its the 'not' operator, for example...

Code:
Public void Test(int moose){

   If moose != 1337 {
   moose = 1337;
   }

}


Says if the int being passed in isn't set to 1337 then set it to 1337 - see?

Author:  William [ Sat Apr 04, 2009 1:55 am ]
Post subject:  Re: String Checks

Fox wrote:
Its the 'not' operator, for example...

Code:
Public void Test(int moose){

   If moose != 1337 {
   moose = 1337;
   }

}


Says if the int being passed in isn't set to 1337 then set it to 1337 - see?

I understand the code you passed on. But he part:
Code:
!A-Za-z

I can't see how that would work. Why Za for example? I havn't googled this and I'm sure that would give me the info needed. But anyway, I'm to tired to go that way when I'm sure Dugor can explain it with his own words.

Author:  KruSuPhy [ Sat Apr 04, 2009 1:58 am ]
Post subject:  Re: String Checks

Uh.
Za?
Isn't it just "A-Z", Then "a-z" (A-Za-z)

Author:  William [ Sat Apr 04, 2009 2:06 am ]
Post subject:  Re: String Checks

I'm getting too curious about this, the only reason I could think of it being this way is if he declares high characters and low characters. But still that seems odd because you could put a command around it to do that if the if statement wasn't constructed in that way. But I suppose that's the glory about that code. Easier and probably faster.

Author:  Dragoons Master [ Sat Apr 04, 2009 2:41 pm ]
Post subject:  Re: String Checks

http://msdn.microsoft.com/en-us/library/swf8kaxw.aspx

Author:  doomJoost1 [ Sun Apr 05, 2009 4:01 pm ]
Post subject:  Re: String Checks

Small addon

IF IsNumeric(String) = True Then
Oh, its not true, cause its a string, not a number.
End If

To prevent players sending a string instead of a number which can lead to server crash.

Author:  wanai [ Wed Dec 01, 2021 8:40 am ]
Post subject:  Re: String Checks

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт

Author:  wanai [ Sun Jan 02, 2022 9:55 pm ]
Post subject:  Re: String Checks

Econ

Author:  wanai [ Sun Jan 02, 2022 9:56 pm ]
Post subject:  Re: String Checks

79.8

Author:  wanai [ Sun Jan 02, 2022 9:57 pm ]
Post subject:  Re: String Checks

Bett

Author:  wanai [ Sun Jan 02, 2022 9:58 pm ]
Post subject:  Re: String Checks

Bett

Author:  wanai [ Sun Jan 02, 2022 9:59 pm ]
Post subject:  Re: String Checks

Dani

Author:  wanai [ Sun Jan 02, 2022 10:01 pm ]
Post subject:  Re: String Checks

Vivr

Author:  wanai [ Sun Jan 02, 2022 10:02 pm ]
Post subject:  Re: String Checks

Blac

Author:  wanai [ Sun Jan 02, 2022 10:03 pm ]
Post subject:  Re: String Checks

Coli

Author:  wanai [ Sun Jan 02, 2022 10:04 pm ]
Post subject:  Re: String Checks

Mark

Author:  wanai [ Sun Jan 02, 2022 10:05 pm ]
Post subject:  Re: String Checks

Poin

Author:  wanai [ Sun Jan 02, 2022 10:06 pm ]
Post subject:  Re: String Checks

Sile

Author:  wanai [ Sun Jan 02, 2022 10:07 pm ]
Post subject:  Re: String Checks

NiMH

Author:  wanai [ Sun Jan 02, 2022 10:08 pm ]
Post subject:  Re: String Checks

Orie

Page 1 of 53 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/