[Código-Batch] Strlen sin IF - JaAViEr

Iniciado por JaAViEr, Julio 17, 2011, 05:26:37 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Julio 17, 2011, 05:26:37 AM Ultima modificación: Febrero 22, 2015, 09:34:28 PM por Expermicid
Hola, Buenas...
Sencillo STRLEN en Batch sin usar IF :D
Código: dos

@echo off
set/a count=0
SET/P "NAME= > "
:COUNT
SET/A COUNT+=1
CALL SET FINAL=%%NAME:~0,%COUNT%%%
FOR /F %%A IN ('echo.%FINAL% ^| find "%NAME%"') DO (
echo.String :%name%
echo.Caracteres : %count%
EXIT/B
)
GOTO:COUNT

Código mas que sencillo.


Saludos.
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login