Here's the problem. I need to cutoff any text to the right of and including the following words: "1CFP", "CFP", "1TNK", "TNK", "1AL1", "Al1", "1ATC", "ATC", "1WBL", "WBL", "1SHP", "SHP". (See full text below.) The constraint is that I cannot use methods or packages from Java 1.4, just 1.3. This means no regex and no strObj.split(param). (I used the latter successfully to cutoff the text, but then found out that it had to be compatible with version 1.3). I've tried a few approaches with no success. I must admit, my problem is with the logic. So I'm hoping that someone could give me some pointers. I'd really appreciate it.
[ April 08, 2003: Message edited by: Chris Cairns ]
Joined: Jan 30, 2002
Maybe something like this:
Here's the output:
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Joined: Jan 31, 2003
I think what I can do is grab the character length of each row. If it's greater than 69, then I'll grab a substring from 0 to 69. If not, then don't grab a substring.