Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
12
Task/String-matching/Batch-File/string-matching-2.bat
Normal file
12
Task/String-matching/Batch-File/string-matching-2.bat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
set /p a=
|
||||
set /p b=
|
||||
set /a i=0
|
||||
for %%i in (^^%b% %b% %b%$) do (
|
||||
echo/%a% | findstr /rc:"%%i" >nul 2>nul && set contain.!i!=Yes|| set contain.!i!=No
|
||||
set /a i+=1
|
||||
)
|
||||
echo "%a%" starts with "%b%": %contain.0%
|
||||
echo "%a%" ends with "%b%": %contain.1%
|
||||
echo "%a%" contains "%b%": %contain.2%
|
||||
Loading…
Add table
Add a link
Reference in a new issue