[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] ctype Functions in Gforth ( Joel Rees )

From: James Gere
Subject: Re: [gforth] ctype Functions in Gforth ( Joel Rees )
Date: Fri, 14 Jul 2017 07:13:32 -0400

     Hi! Joel,
                    ctype functions only apply to ascii, but 
I'm sure there are similar libraries for UTF-8, etc.
Most of the ctype functions translate easily into
forth with one or two tests, using, for 
example,  'within', in combination with bit 
operations ( 'and', 'or', 'xor', etc. ) and basic 
     I'm sure you could "cook in" the library bindings 
in your Gforth build, but I'm not sure it's worth the 
effort to do this for all light-use bindings.
     There is one exception:  ctype's 'IsGraphic()' 
gives its answer based on the default locale 
specified to the C compiler.
     Most forths also provide versions of, at least 
one of, 'to-upper', 'to-lower' or 'flip-case'; for 
searching the dictionary.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]