• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Downcase every sentence except 1st alphabet

#1 2012-06-13 10:33:51

mfuzaimi
Member
Registered: 2011-10-05
Posts: 39

Downcase every sentence except 1st alphabet

Hi,

I got a set of data which the string is uppercase. How can I make the the data downcase except for the 1st alphabet? I know in tMap got function called downcase but it actually convert all the string to downcase.

Regards,
Fuzaimi

Offline

#2 2012-06-13 10:35:51

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

Re: Downcase every sentence except 1st alphabet

Hi,

Could you give an example of your desired in/output? Because it's not quite clear to me what you mean by the 1st alphabet.

Regards,
Arno

Offline

#3 2012-06-13 10:40:42

mfuzaimi
Member
Registered: 2011-10-05
Posts: 39

Re: Downcase every sentence except 1st alphabet

Hi avdbrink,

For example, I got a data from source table as below:

2012.0    4    2012-04-15 00:00:00    ONE-OFF    MODULE    30000    3

And I want to change the data to:

2012.0    4    2012-04-15 00:00:00    One-off    Module    30000    3



Regards,
Mohd Fuzaimi

Last edited by mfuzaimi (2012-06-13 10:42:02)

Offline

#4 2012-06-13 11:12:45

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

Re: Downcase every sentence except 1st alphabet

Hi,

You could use org.apache.commons.lang.WordUtils library with capitalize(String str) to do just that.

Regards,
Arno

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Downcase every sentence except 1st alphabet

Board footer

Powered by FluxBB