Solved

string parsing question

Posted on 2013-06-13
1
227 Views
Last Modified: 2013-06-14
I have Strings defined like so:
public final static String RED_LARGE = "red-large@";
public final static String TOP_RED_LARGE = "top-red-large@";	
public final static String BOTTOM_RED_LARGE = "bottom-red-large@";

Open in new window

The strings are appended with an int during runtime, so that values could be, for example:
red-large@2
top-red-large@2
bottom-red-large@3
These string values are assigned to a class, call it MyClass, via a class member called userString, so userString could be any of the above values or some orther value on the int.
What is the best way to determine if userString is a RED_LARGE (ie not TOP_RED_LARGE  or BOTTOM_RED_LARGE )?
0
Comment
Question by:allelopath
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39244733
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question