String handling with -

Highlighted
Five Stars

String handling with -

Hey Guys,

 

I have the string "4711" in tMap. I want to transform to "47-11". Is there such Java to transform like that?

 

Thanks for your participation,

 

Best Regards,

 

 


Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: String handling with -

Hi,

Stricly based on your example, you can use the following:

StringHandling.LEFT(row6.Title1,2)+"-"+StringHandling.RIGHT(row6.Title1,2) 

TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: String handling with -

Hi,

Stricly based on your example, you can use the following:

StringHandling.LEFT(row6.Title1,2)+"-"+StringHandling.RIGHT(row6.Title1,2) 

TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download