🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #117

Re: fonction pour savoir si un caratere est imprimable ?

#117
From: James.Kanze
Date: Fri, 05 Jan 2001 16:09
26 lines
1840 bytes
In article <934l59$nga$1@s1.read.news.oleane.net>,
  "Fr�d�ric VIALLET" <fviallet@com1.fr> wrote:

> En VC++6, existe t il une fonction qui dit si un carateres est
> imprimable ou non ?

    #include <locale>

    template< typename charT >
    std::isprint( charT ch , locale const& ) ;

En tant que template, il marche aussi bien avec char qu'avec wchar_t.

Il y a aussi un isprint dans <ctype.h>, h�rit� de C. Malheureusement,
il ne marche PAS avec le type char -- il faut caster le char en
unsigned char.

--
James Kanze                               mailto:kanze@gabi-soft.de
Conseils en informatique orient�e objet/
                   Beratung in objektorientierter Datenverarbeitung
Ziegelh�ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627


Sent via Deja.com
http://www.deja.com/
Technical Details
Message-ID: <934rjk$mq1$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
References: <934l59$nga$1@s1.read.news.oleane.net>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 1138df,6705f8bae93f4da9
X-Google-Attributes: gid1138df,public
X-Google-Thread: fdcad,6705f8bae93f4da9
X-Google-Attributes: gidfdcad,public
X-Google-ArrivalTime: 2001-01-05 08:23:05 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
From: James.Kanze@dresdner-bank.com
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,fr.comp.lang.c++
Subject: Re: fonction pour savoir si un caratere est imprimable ?
Date: Fri, 05 Jan 2001 16:09:33 GMT
Organization: Deja.com
Lines: 26
Message-ID: <934rjk$mq1$1@nnrp1.deja.com>
References: <934l59$nga$1@s1.read.news.oleane.net>
NNTP-Posting-Host: 193.194.7.77
X-Article-Creation-Date: Fri Jan 05 16:09:33 2001 GMT
X-Http-User-Agent: Mozilla/4.72 [en] (WinNT; I)
X-Http-Proxy: 1.0 x61.deja.com:80 (Squid/1.1.22) for client 193.194.7.77
X-MyDeja-Info: XMYDJUIDkanze