Subversion Repositories eFlore/Applications.cel

Rev

Rev 2392 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2392 Rev 2401
Line 398... Line 398...
398
		    }
398
		    }
Line 399... Line 399...
399
		 
399
		 
400
		});
400
		});
401
		return listeChampsEtendus;
401
		return listeChampsEtendus;
-
 
402
	}
-
 
403
	
-
 
404
	/**
-
 
405
	 * Solution issue de stackoverflow : 
-
 
406
	 * http://stackoverflow.com/questions/1143951/what-is-the-simplest-way-to-convert-a-java-string-from-all-caps-words-separated
-
 
407
	 */
-
 
408
	public static String convertirEnChaMot(String s) {	
-
 
409
		s = s.replaceAll("_", " ");
-
 
410
		s = s.replaceAll("-", " ");
-
 
411
		String[] parties = s.split(" ");
-
 
412
		String chaineChaMot = "";
-
 
413
		for (String partie : parties){
-
 
414
			chaineChaMot = chaineChaMot + convertirMotEnChaMot(partie);
-
 
415
		}
-
 
416
		return chaineChaMot;
-
 
417
	}
-
 
418
 
-
 
419
	protected static String convertirMotEnChaMot(String s) {
-
 
420
		return s.substring(0, 1).toUpperCase() +
-
 
421
	               s.substring(1).toLowerCase();
402
	}
422
	}