rescue right number()

This function returns a string that is based on text a, but has been reduced to length b. The result text is created from the text beginning with the rightmost number (not digit!), concatenated with the text beginning at the far left (until the concatenated text has reached the maximum length). If the right part is already longer than the maximum length, it is shortened from the right to the appropriate length. See examples.

Parameters


Parameter

Description

a

Text.

b

Length.


Examples


Parameter a

Parameter b

Result

Very very long streetname

10

Very very

Very very long streetname 127 b

20

Very very long 127 b

(Note: This is a concatenation of the 5 'rescued' characters 127 b (text after the rightmost number 127) and (filled from the left with) the 15 characters beginning at the very left of the original text.)

Very very long streetname 127 b

2

12

( Note: The rescued text 127 b has been shortened to length 2 from the right. )

1234567890

5

12345