Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, how would you go about converting a string which is all upper case into capital first letter only for the whole sentence (proper/title case)? There does not seem to be a Talend string function for this and neither built-in to the basic Java libraries.
Hi,
Probably you can use following expression in your tMap
Expression:
----------------
row1.TitleString.toLowerCase().replaceFirst("", row1.TitleString.substring(0,1).toUpperCase())
Note:- "TitleString" is the column name.
--
Regards,
Vinod
Hi, how would you go about converting a string which is all upper case into capital first letter only for the whole sentence (proper/title case)? There does not seem to be a Talend string function for this and neither built-in to the basic Java libraries.
In the talendforge there is an implementation of StringUtils but it doesn't appear supported for DI 6.3. I was wondering since the original posting in 2011 is there a updated library that should be used with tLoadLibrary component?
The original poster suggested the values below but when I browse the list of libraries available I see others and from the apache documents capitalize looks to be available in most
commons-lang-2.5.jar
and
import the class
org.apache.commons.lang.StringUtils