Remove Training lf

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Remove Training lf

  • Creator
    Topic
  • #51660
    David Harrison
    Participant

      I need to remove the trailing line feed character in a tcl variable. It’s in my head somewhere but I can’t shake it out.

    Viewing 1 reply thread
    • Author
      Replies
      • #71163
        Jim Kosloskey
        Participant

          David,

          How about string trimright?

          set junk “123n”

          set junk [string trimright $junk “n”]

          You could use string map but that would remove all n.

          Or you always could use regsub – but why when string trimright will do the job nicely?

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #71164
          David Harrison
          Participant

            Exactly what I was groping for.

            Thanks Jim

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.