@luntik2012: From documentation of `execProcess`:

> WARNING: this function uses poEvalCommand by default for backward 
> compatibility.

This means that it executes the command within a shell, which is probably 
responsible for the trailing newline.

@Stefan_Salewski: Well, it's easy enough to implement:
    
    
    import strutils, future
    
    proc hexDump(s: string) =
      echo lc[toHex(int8(c)) | (c <- s), string].join(" ")
    
    hexDump("123\n")
    

yields:
    
    
    31 32 33 0A
    

Reply via email to