Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function CountDigits(Value: Cardinal): Cardinal; inline;
- begin
- case Value of
- 0..9: Result := 1;
- 10..99: Result := 2;
- 100..999: Result := 3;
- 1000..9999: Result := 4;
- 10000..99999: Result := 5;
- 100000..999999: Result := 6;
- 1000000..9999999: Result := 7;
- 10000000..99999999: Result := 8;
- 100000000..999999999: Result := 9;
- else
- Result := 10;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement