Delete Integer Digits
Remove the digits at chosen positions from an integer and report what went.
What this page computes
Enter an integer and a comma-separated list of positions, and the page removes the digits at those positions. Positions are 1-based and refer to the input, so deleting 2 and 5 from 123456 removes the 2 and the 5 before anything shifts.
Where it stops
A position of 0, a position past the last digit, or a repeated position is refused with the acceptable range, because silently skipping it would print a different number from the one you asked for. A minus sign is refused because it is not a digit.
Why the answer repeats
The removal is string slicing in this tab, so the same number and positions always print the same result and nothing is uploaded.
Deletes the digits at the positions you name, 1-based against the input, and reports which digits were removed. Positions outside the number are refused with the valid range; a minus sign is refused.
How to use it
Type the integer, list the positions separated by commas, then press Run. The first line is the shorter number and the second names the removed digits.
The arithmetic
Positions are collected into a set first, so listing 2 twice deletes one digit. Deletion happens against the original index, which is why positions never need adjusting as digits go.
What to Expect
Best for
- deleting check digits
- trimming an identifier
What this tool keeps
- the shortened number and the removed digits
Sample input
123456 with positions 2,5
Sample output
1346 Deleted 25 at position(s) 2, 5.
Frequently asked questions
How do I use the delete integer digits page?
Type the integer and the comma-separated positions, then press Run.
Is anything uploaded?
No. The whole calculation runs in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once it has loaded.
What are its limits or bounds?
Positions must be whole numbers from 1 to the digit count. A position outside that range must be refused, because skipping it would print a number nobody asked for.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.