comp.lang.ada
 help / color / mirror / Atom feed
From: "Thomas Løcke" <thomas@12boo.net>
Subject: Re: Checking to see is a string is a letter
Date: Tue, 03 Apr 2012 09:09:39 +0200
Date: 2012-04-03T09:09:39+02:00	[thread overview]
Message-ID: <4f7aa230$0$292$14726298@news.sunsite.dk> (raw)
In-Reply-To: <XnsA029E1D07C7DFUSSR@88.198.244.100>

On 04/03/2012 04:11 AM, deuteros wrote:
> Is there a way to check if a string variable contains a single letter?


A possible solution would be to take a look at Ada.Strings.Maps and
Ada.Strings.Maps.Constants.

You can then use Ada.Strings.Fixed.Count to count the number of matches
against your map, and if the result isn't exactly 1, then you know your
string contains either zero "single letter" or several "single letter".

But first of course you need to define exactly what "single letter"
means.

:o)

-- 
Thomas L�cke | thomas@12boo.net | http://12boo.net



      parent reply	other threads:[~2012-04-03  7:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03  2:11 Checking to see is a string is a letter deuteros
2012-04-03  4:18 ` Leo Brewin
2012-04-03  4:52   ` Checking to see if " deuteros
2012-04-03  5:15     ` Jeffrey Carter
2012-04-03  6:07       ` deuteros
2012-04-03  6:47         ` Gautier write-only
2012-04-03 12:55           ` deuteros
2012-04-03 14:19             ` gautier_niouzes
2012-04-03  8:26         ` Simon Wright
2012-04-03 12:56           ` deuteros
2012-04-03 13:46           ` Dmitry A. Kazakov
2012-04-05 17:12           ` deuteros
2012-04-05 17:24             ` Martin Dowie
2012-04-05 18:04               ` deuteros
2012-04-05 18:18             ` Adam Beneschan
2012-04-05 18:56             ` Simon Wright
2012-04-03 20:40         ` Jeffrey Carter
2012-04-03  7:09 ` Thomas Løcke [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox