on 07-23-2012 5:50 AM
Hello All,
I need to create mapping to split an input string into a predefined length (say 10 characters). However I also have to ensure that no word is split in between.
<Input>
<Input_text>This is a statement with variable length</Input_text>
</Input>
<Output>
<Node>
<Output_String>This is a </Output_String>
</Node>
<Node>
<Output_String>statement </Output_String>
</Node>
<Node>
<Output_String>with </Output_String>
</Node>
<Node>
<Output_String>variable </Output_String>
</Node>
<Node>
<Output_String>length</Output_String>
</Node>
</Output>
Any idea how to proceed?
<Moved from Process Orchestration Space>
Message was edited by: Prateek Raj Srivastava
Hi Pankaj
Flowwing logic might help you.
i=0;
while(i<=strglength)
{
if(a[i+10] = ' ')
{
str.split(i,i+10);
i=i+10;
}
else
{
i=i+10;
j=10
while(a[i] != ' ')
{
i--;
j--;
}
str.split(i,j);
}
}
Regards
Gagandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.