trace/traceanalyser/com.nokia.s60tools.traceanalyser/src/com/nokia/s60tools/traceanalyser/export/GeneralMethods.java
changeset 9 14dc2103a631
equal deleted inserted replaced
8:15296fd0af4a 9:14dc2103a631
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 package com.nokia.s60tools.traceanalyser.export;
       
    21 
       
    22 public class GeneralMethods {
       
    23     /**
       
    24      * getTextBetweenQuotes.
       
    25      * Returns text between two first quotation marks on line that is give as parameter
       
    26      * @param line where quotations are searched.
       
    27      * @return text between quotation marks
       
    28      */
       
    29     public static String getTextBetweenQuotes(String line){
       
    30     	int index = 0;
       
    31     	if((index =line.indexOf("\"")) > -1){
       
    32 			line = line.substring(index+1);
       
    33     		if((index =line.indexOf("\"")) > -1){
       
    34     			return line.substring(0,index); 
       
    35     		}
       
    36 		}
       
    37     	return null;
       
    38     }
       
    39 }