Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
11
Task/Reverse-a-string/Batch-File/reverse-a-string-2.bat
Normal file
11
Task/Reverse-a-string/Batch-File/reverse-a-string-2.bat
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
@echo off
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
set str=%1
|
||||
::strlen4 from https://ss64.com/forum/strlen.html
|
||||
set "tempFile=%temp%\strlen-reverse.tmp"
|
||||
echo(%str%>"%tempFile%"
|
||||
for %%F in ("%tempFile%") do set /a len=%%~zF-3
|
||||
del "%tempFile%"
|
||||
<nul (
|
||||
for /l %%i in (%len%,-1,0) do set/p=!str:~%%i,1!
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue