Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » adding to_number(hex) and find?
adding to_number(hex) and find? [message #47970] Sat, 29 April 2017 13:41
luoganda is currently offline  luoganda
Messages: 85
Registered: November 2016
Member
void ESC_to_number(EscEscape& e)
{
	if(e[0].IsArray()){
		String str=(String)e[0];
		if(str[0]=='0'&&str[1]=='x'){e=ScanInt64(str.Mid(2),0,16);return;}
		double d = ScanDouble(str);
		if(!IsNull(d)) {
			if(d <= INT64_MAX && d >= INT64_MIN)
				e = ScanInt64(str);
			else
				e = d;
		}
	}
}

//int=find(text,find,from=0);
void SIC_Find(EscEscape& e){
	e.CheckArray(0);
	e.CheckArray(1);
	e.CheckNumber(2);
	e.ret_val=((String)e[0]).Find((String)e[1],e[2].GetInt());
}

[Updated on: Sat, 29 April 2017 13:46]

Report message to a moderator

Previous Topic: To advance using int64 in ESC
Next Topic: add more robust mid and some file funcs?
Goto Forum:
  


Current Time: Mon Dec 11 15:56:49 CET 2017

Total time taken to generate the page: 0.01104 seconds