tcopy.nim 397 B

1234567891011121314151617181920212223242526
  1. discard """
  2. file: "tcopy.nim"
  3. output: "TEMP=C:\\Programs\\xyz\\bin"
  4. """
  5. # tests the substr proc
  6. import
  7. strutils
  8. proc main() =
  9. const
  10. example = r"TEMP=C:\Programs\xyz\bin"
  11. var
  12. a, b: string
  13. p: int
  14. p = find(example, "=")
  15. a = substr(example, 0, p-1)
  16. b = substr(example, p+1)
  17. writeLine(stdout, a & '=' & b)
  18. #writeLine(stdout, b)
  19. main()
  20. #OUT TEMP=C:\Programs\xyz\bin