home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,025 of 68,980   
   Herbert Kleebauer to John Gray   
   Re: Transform string to the same number    
   25 Aug 17 10:37:37   
   
   From: klee@unibwm.de   
      
   On 23.08.2017 14:32, John Gray wrote:   
      
   > I can do this via a looping mechanism, letter by letter, but is there   
   > a more elegant method requiring one or just a few lines?   
   >   
   > set original=SingleWord   
   > transforms to   
   > set underline=----------   
      
   Slow but short:   
      
   @echo off   
   set original=Single Word   
   echo %original%   
      
   for /l %%i in (1,1,32) do call set original=%%original:~1%%-   
      
   echo %original%   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca