I have 2 Java strings
1st String is a series of names, colons, and numbers
ie) Name1:13:Name2: 4526:Name3:789: Name4:3729:Name 5:6:Name6:44
2nd String is a name
ie) Name2
I need to get the number associated with that name.
So I need a java function that traverses that first string, looks for the 2nd string, and returns the number that is directly after it. Thus in my example, I would pass the function String1 and String2 and it would return the number 4526.
Can someone help? My string manipulation skills in java are sub par...I know how to do it in sql, but not java.
-Jason
1st String is a series of names, colons, and numbers
ie) Name1:13:Name2: 4526:Name3:789: Name4:3729:Name 5:6:Name6:44
2nd String is a name
ie) Name2
I need to get the number associated with that name.
So I need a java function that traverses that first string, looks for the 2nd string, and returns the number that is directly after it. Thus in my example, I would pass the function String1 and String2 and it would return the number 4526.
Can someone help? My string manipulation skills in java are sub par...I know how to do it in sql, but not java.
-Jason
Comment