Re: Remove new line char

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Remove new line char
De : mssr953 (at) *nospam* gmail.com (Michael Soyka)
Groupes : comp.lang.tcl
Date : 19. Mar 2025, 21:54:20
Autres entêtes
Organisation : self
Message-ID : <vrfats$1jt1f$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
Hi.
I'm sorry I missed what came before but ...
On 03/19/2025 1:44 PM, alexandru wrote:
Thanks Ralf.
 I tried:
 format %x [scan [string index $text end] %c]
 but it only identifies 0 as last char.
Just to be clear, are you saying that scan returns the integer value zero or does it return 48, the ascii code for zero?  If it's the integer zero, that says to me that "text" contains a NUL-terminated string.  If so, does not
    regsub {\x00$} $text {} text_sans_nul
do what you want?

 both
   set text [regsub {[[:space:]]+$} $text ""]
 and
   set text [regsub {[\s]+$} $text ""]
 made no difference...
--
-mike

Date Sujet#  Auteur
19 Mar 25 * Remove new line char23alexandru
19 Mar 25 +* Re: Remove new line char4Ralf Fassel
19 Mar 25 i`* Re: Remove new line char3alexandru
19 Mar 25 i `* Re: Remove new line char2Michael Soyka
20 Mar 25 i  `- Re: Remove new line char1alexandru
19 Mar 25 +- Re: Remove new line char1Arjen
19 Mar 25 +* Re: Remove new line char16Harald Oehlmann
19 Mar 25 i`* Re: Remove new line char15alexandru
19 Mar 25 i +- Re: Remove new line char1alexandru
19 Mar 25 i `* Re: Remove new line char13Rich
20 Mar 25 i  `* Re: Remove new line char12alexandru
20 Mar 25 i   `* Re: Remove new line char11alexandru
20 Mar 25 i    +* Re: Remove new line char9Harald Oehlmann
20 Mar 25 i    i`* Re: Remove new line char8alexandru
20 Mar 25 i    i `* Re: Remove new line char7Rich
21 Mar 25 i    i  `* Re: Remove new line char6Harald Oehlmann
21 Mar 25 i    i   `* Re: Remove new line char5Rich
21 Mar 25 i    i    +* Re: Remove new line char3alexandru
23 Mar 25 i    i    i`* Re: Remove new line char2Harald Oehlmann
24 Mar 25 i    i    i `- Re: Remove new line char1Ashok
23 Mar 25 i    i    `- Re: Remove new line char1Harald Oehlmann
20 Mar 25 i    `- Re: Remove new line char1Michael Soyka
20 Mar 25 `- Re: Remove new line char1Simon Geard

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal