Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulating Strings!!

Status
Not open for further replies.

poh12

Programmer
Dec 12, 2004
1
US
I need help! I want to validate or check a string, but i need to find a character or space to check the string written before... i'm trying to make a sql checker, so i need to check if the sentence or phrase is rigth or if it's written wrong..
PLEASE HELP ME!!!!

 
To find a character in a c-string you could use strchr(...) (see help), if you want to find it "from behind" use strrchr(...).

Totte
Keep making it perfect and it will end up broken.
 
it would be perhaps easier to separate the sql
statement into a string list of all individual
words.

SELECT Company, OrderNumber FROM Orders
ORDER BY Company

becomes a list

SELECT
Company,
OrderNumber
FROM
Orders
ORDER
BY
Company

then based upon a list of rules you can determine if
the word following the first word is legitimate or not.
and so on

tomcruz.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top