Hi,
I am trying to remove a single instance of the string REM (which is a smart value) from the string TOT (which is also a smart value). Im within a branch when doing this but I dont think that the branch is the problem. So basically I want to do something like
Assign TOT.remove(REM) to TOT
If TOT is ABCDEFG and REM is CDE, then this works fine
But if TOT is ABCDEFGABCDEFG and REM is CDE, then I want it to only remove the first occurrence. But of course thats not the syntax of remove.
So I tried things like getting the left and right hand sides separately and then concatting
so left would be TOT.left(TOT.indexOf(REM))
and right would be TOT.right(TOT.indexOf(REM)+REM.length())
and so the whole thing would be
TOT.left(TOT.indexOf(REM)).concat(TOT.right(TOT.indexOf(REM)+REM.length()))
Except this means nesting smart values, and JIRA doesnt like that (at least thats what I understand).
So does anybody have a cunning way of doing this?