# Text.IncStr(Text, BigInteger) Method
> Version: _Available or changed with runtime version 15.0._
Increments the last positive number by the provided increment. The result of the increment must be zero or positive, otherwise an error is thrown.
## Syntax
```al
NewString :=   Text.IncStr(String: Text, Increment: BigInteger)
```
> NOTE
> This method can be invoked without specifying the data type name.
## Parameters
String
Type: text-data-type
The string that you want to increase or decrease.
Increment
Type: ../biginteger/biginteger-data-type
The increment value.
## Return Value
NewString
Type: text-data-type
The incremented string.
## Remarks
The Text.IncStr method increases the last positive number or decreases the last negative number inside a string by the provided positive increment. The method returns a new string with the incremented or decremented value. When decreasing a positive number, you should use a try function to catch cases where the string can't be decreased further. When decreasing, leading zeros will be added as applicable.
### Example
```al
codeunit 50111 MyAccountCodeunit
{
    procedure MyIncStr()
    var
        Account: Text[60];
        ResultAccount: Text[60];
        AText: TextConst ENU = 'Account No. 99 doesn''t balance.';
    begin
        Account := AText;
        ResultAccount := IncStr(Account, 10);
    end;
}
```
## Related information
text-data-type
Getting started with AL<../../devenv-get-started>
Developing extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/text/text-incstr-string-biginteger-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/text/text-incstr-string-biginteger-method/
