Chicago, AP and APA all define title case differently, mostly over which prepositions stay lowercase. Any implementation is enforcing one guide's opinion, and users of another will consider its output wrong.
The preposition length threshold
AP lowercases prepositions of three letters or fewer; Chicago lowercases them regardless of length unless they are used adverbially. So Looking Up the Answer is correct under one reading and Looking up the Answer under another, and no algorithm without grammatical understanding can distinguish the adverb from the preposition.
Hyphenated compounds
State-of-the-Art or State-of-the-art? Guides differ, and an implementation must simply choose.
What breaks most naive implementations
Capitalising the character after every space misses the word after a hyphen or an opening parenthesis, and destroys deliberate internal capitals: iPhone becomes IPhone, eBay becomes EBay, McDonald's becomes Mcdonald's. Maintain an exceptions list of brand spellings and apply it after conversion — it is the only reliable fix.
Try it: Convert Text to Title Case on SeoWolf's Notepad.