on 07-01-2008 3:56 PM
Hi Javaman,
I work on PI and I'm facing to stupid pb: easy in abap, but in Java is another story...
Here's what I want to do in Java (especially inside SAP PI):
Source = abcdefgh.
Target = 1234567
Target+10(6) = Source(6).
Thus result should be: Target = "1234567 abcdef" with three spaces coz the first part is on 10 characters.
My pb is not to get the 6 char of Source (cf. fct substring), but it's the managment of the offset "+10".
£#$% ??!!
Thanks
Mickael
Hi,
Use StringBuffer (it's better then concatenate Strings)
StringBuffer bf = new StringBuffer();
bf.append("1234567 ");
bf.append("abcdefgh");
String source = bf.subString(10).toString();
Refer to javadocs of StringBuffer for details.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.