Revision 9469

View differences:

trunk/libraries/libIverUtiles/src/com/iver/utiles/stringNumberUtilities/StringNumberUtilities.java
71 71
		if (word.length() == 0)
72 72
			return false;
73 73

  
74
		// If first symbol is '+'
75
		if (word.charAt(0) == '+')
76
			word = word.substring(1, word.length());
77
		
74 78
		// Analize the word
75 79
		for (int i = 0; i < word.length(); i++) {
76 80
			switch (word.charAt(i)) {
......
101 105
			return false;
102 106

  
103 107
		// Try to extract the natural number
104
		if (word.charAt(0) == '-')
108
		if ((word.charAt(0) == '-') || (word.charAt(0) == '+'))
105 109
			word = word.substring(1, word.length());
106 110
		
107 111
		return isNaturalNumber(word);
......
125 129
		if (word.length() == 0)
126 130
			return false;
127 131
	
128
		// Try to extract the natural number
129
		if (word.charAt(0) == '-')
132
		// Try to remove the sign of the number
133
		if ((word.charAt(0) == '-') || (word.charAt(0) == '+'))
130 134
			word = word.substring(1, word.length());
131 135
		
132 136
		// Analize the word

Also available in: Unified diff