--- title: "rescue right number()" slug: "string-rescue-right-number" updated: 2026-08-17T08:08:02Z published: 2026-08-17T08:08:02Z canonical: "docs.lobstersoftware.com/string-rescue-right-number" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # 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* |