Permalink
Browse files

Create removeLeadingZeroes.bat

  • Loading branch information...
npocmaka committed Jan 21, 2015
1 parent b83344a commit 281daddad767e5e9f9349eb68e0c3ce74f8973a0
Showing with 11 additions and 0 deletions.
  1. +11 −0 math/removeLeadingZeroes.bat
@@ -0,0 +1,11 @@
::http://stackoverflow.com/questions/14762813/remove-leading-zeros-in-batch-file
:: exit /b number automatically removes leading zeroes and does not take the number as octal
:: also requires small piece of coding , but could affect the performance a little bit
:removeLeadingZeroes number [rtnVar]
setlocal
cmd /c exit /b %~1
endlocal && (
if "%~2" neq "" (set %~2=%errorlevel%) else echo %errorlevel%
)

0 comments on commit 281dadd

Please sign in to comment.