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 » U++ Library support » U++ Core » Some 'missing' string functions
Re: Some 'missing' string functions [message #17765 is a reply to message #16344] Thu, 28 August 2008 10:13 Go to previous messageGo to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
I'm trying to use FindFirstOf and I am getting this error when compiling:
c:\program files\upp-svn\uppsrc\core\AString.hpp(114) : error C2039: 'End' : is not a member of 'Upp::String0'
 C:\Program Files\upp-svn\uppsrc\Core/String.h(133) : see declaration of 'Upp::String0'
        c:\program files\upp-svn\uppsrc\core\AString.hpp(111) : while compiling class template member function 'int Upp::AString<B>::FindFirstOf(int,const char *,int) const'
        with
        [
            B=Upp::String0
        ]
        C:\Program Files\upp-svn\uppsrc\Core/Topt.h(205) : see reference to class template instantiation 'Upp::AString<B>' being compiled
        with
        [
            B=Upp::String0
        ]
        C:\Program Files\upp-svn\uppsrc\Core/String.h(281) : see reference to class template instantiation 'Upp::Moveable<T,B>' being compiled
        with
        [
            T=Upp::String,
            B=Upp::AString<Upp::String0>
        ]

Focus was brought to this section of code:
int AString<B>::FindFirstOf(int len, const tchar *s, int from) const
{
	ASSERT(from >= 0 && from <= GetLength());
	const tchar *ptr = B::Begin();
	const tchar *e = B::End();
	const tchar *se = s + len;
	if(len == 1) {
		tchar c1 = s[0];
		for(const tchar *bs = ptr + from; bs < e; bs++) {
			if(*bs == c1)
				return (int)(bs - ptr);
		}
		return -1;

My source line is:
String whitespace(" \n\t");
pos = _title.FindFirstOf(whitespace);

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Commandline-Args with Core-Console-App
Next Topic: Path including non-English character, buglog and usrlog file cannot be deleted
Goto Forum:
  


Current Time: Mon May 20 01:01:01 CEST 2024

Total time taken to generate the page: 2.61826 seconds