Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::: RC4
- :::::::::::::::::::::::::::::::::::::::::::
- ::: add_padding.bat private extension :::
- :::::::::::::::::::::::::::::::::::::::::::
- ::: CALCULATES and Pads %str% to equal :::
- ::: the correct string length needed. :::
- ::: Simply by adding %addspcs% spaces. :::
- :::::::::::::::::::::::::::::::::::::::::::
- ::: split out from runtime_display.bat :::
- ::: v7.9.8.89 20221124005533 by -JpE- :::
- :::::::::::::::::::::::::::::::::::::::::::
- if not defined vers set vers=v8.7.0.10 20231108073214 by -JpE-
- ::: NOTE: This is merely a specific Function
- ::: extension for use by runtime_display.bat (only)
- ::::::::::::::::::::::::::
- call %strlen% leng1,l1
- call %strlen% leng2,line
- ::::::::::::::::::::::::::
- :::::: NOW Calc Desired Length :::::::::
- set /a desired=(%leng1%-6)
- set /a addspcs=(%desired%-%leng2%)
- ::: And make it ^^^^^^^^^^^^^^^^^ longer.
- if %addspcs% lss 0 goto return
- ::::::: Unless already too ^ long ::::::
- set newstr=%line%
- set /a nnn=(%addspcs%)
- set /a num=0
- set spc=
- ::: use ^ whatever char desired here. ::
- :padit
- set /a num+=1
- if %num% gtr %nnn% goto checkit
- set newstr=%newstr%%spc%
- goto padit
- :checkit
- ::::::::::::::::::::::::::
- call %strlen% len,newstr
- ::::::::::::::::::::::::::
- set /a ok=0
- set /a chk=(%leng2%+%addspcs%)
- if %desired% equ %chk% set /a ok+=1
- if %len% equ %chk% set /a ok+=2
- if %len% equ %desired% set /a ok+=4
- if %ok% lss 3 echo unverified, Using as was...
- if %ok% gtr 4 set line=%newstr%
- :return
- ::: 100% -JpE-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement