var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: substr question
my brother is a student he ask me this question :
He has a text field contains names like this
'aaaa dddd vvv'
'ssss mmmm oooo'
'eeee uuuu pppp'
he wants to split the name:
'aaaa' 'dddd' 'vvv'
I answered like this:
p1 := instr(field1, ' ' , 1, 1)
p2 := instr(field1, ' ' , 1, 2)
first_name := substr(field1, 1, p1-1);
second_name := substr(field1, p1+1, p2-p1-1);
third_name := substr(field1, p2+1, lenght(field1)-p2);
its work ok ....
but if there is more than one space togother OR
the name contain more or less than 3 parts, the code will not work
any other idea
thnkx in advance
You can have a look at this thread, I think it might help you.