Raised This Month: $12 Target: $400
 3% 

Solved Compairing two floats


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-24-2018 , 14:00   Re: Compairing two floats
Reply With Quote #11

One little fix for my script (just for those who like to use it in future): need check for empty string.

Final:

Code:
// check if string is a valid number
//
bool IsNumeric(char[] Str)
{
	static Regex regex;
	if (regex == null)
		regex = new Regex("^(((\\+|-)?\\d+(\\.\\d+)?)|((\\+|-)?\\.\\d+))(e(\\+|-)\\d+)?$", PCRE_CASELESS);
	if (strlen(Str) == 0) return (false);
	return (regex.Match(Str) > 0);
}
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply


Thread Tools
Display Modes

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 12:54.


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