cannot add WString.h  ..pls help mee !! =((

I cannot add the WString.h library.. I copied String folder into libraries folder of my appl. folder but
when I add just #include<WString.h> line It gives many error

D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:34: error: prototype for 'String::String(int)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:39: error: candidates are: String::String(long unsigned int, int)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:38: error:                 String::String(long int, int)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:37: error:                 String::String(unsigned int, int)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:36: error:                 String::String(int, int)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:35: error:                 String::String(unsigned char)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:34: error:                 String::String(char)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:33: error:                 String::String(const String&)
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:32: error:                 String::String(const char*)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: In constructor 'String::String(const char*)':
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:50: error: '_array' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:52: error: 'setArray' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: In copy constructor 'String::String(const String&)':
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:60: error: '_array' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:61: error: 'clear' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:62: error: 'const class String' has no member named '_array'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:62: error: 'setArray' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: In member function 'const String& String::operator=(const String&)':
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:77: error: '_array' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:83: error: 'clear' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:84: error: 'const class String' has no member named '_array'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:84: error: 'setArray' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: At global scope:
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:90: error: prototype for 'const String& String::operator=(const char*)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:70: error: candidate is: const String& String::operator=(const String&)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:107: error: prototype for 'const String& String::operator+=(const char*)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:44: error: candidate is: const String& String::operator+=(const String&)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:127: error: prototype for 'const String& String::operator+=(char)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:44: error: candidate is: const String& String::operator+=(const String&)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:145: error: prototype for 'const String& String::operator+=(int)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:44: error: candidate is: const String& String::operator+=(const String&)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:159: error: prototype for 'const String& String::operator+=(long int)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:44: error: candidate is: const String& String::operator+=(const String&)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: In member function 'const String& String::operator+=(const String&)':
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:176: error: '_array' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:179: error: 'setArray' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:183: error: '_array' was not declared in this scope
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:183: error: 'const class String' has no member named '_array'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp: At global scope:
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:191: error: no 'const String& String::append(char)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:196: error: no 'const String& String::append(char*)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:201: error: no 'const String& String::append(const String&)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:206: error: no 'const String& String::append(int, int)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:217: error: no 'const String& String::append(long int, int)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:226: error: no 'const String& String::append(int)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:234: error: no 'const String& String::append(long int)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:323: error: prototype for 'char String::charAt(int)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:57: error: candidate is: char String::charAt(unsigned int) const
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:339: error: prototype for 'void String::setCharAt(int, char)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:71: error: candidate is: void String::setCharAt(unsigned int, char)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:355: error: prototype for 'boolean String::equals(char*)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:60: error: candidate is: unsigned char String::equals(const String&) const
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:366: error: prototype for 'boolean String::equals(const String&)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:60: error: candidate is: unsigned char String::equals(const String&) const
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:372: error: no 'boolean String::contains(char*)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:380: error: prototype for 'byte* String::getBytes()' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:79: error: candidate is: void String::getBytes(unsigned char*, unsigned int)
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:386: error: no 'void String::setArray(const char*)' member function declared in class 'String'
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:396: error: prototype for 'int String::indexOf(int)' does not match any in class 'String'
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:65: error: candidates are: int String::indexOf(const String&, unsigned int) const
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:64: error:                 int String::indexOf(const String&) const
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:63: error:                 int String::indexOf(char, unsigned int) const
D:\Downloads\arduino-0019\arduino-0019\hardware\arduino\cores\arduino/WString.h:62: error:                 int String::indexOf(char) const
D:\Downloads\arduino-0019\arduino-0019\libraries\String\WString.cpp:402: error: prototype for 'int String::indexOf(const String&)' does not match any in

The String class is incorporated into version 0019. You do not need to include WString.h any more.

Excellent info PaulS but do you know how to do a "contains" with the builtin string class?

The indexOf() function will return the location of the specified substring, or -1 if the substring is not found. So, >0 means the string on the left of the . contains the value in the (), and -1 means it does not.