comp.lang.ada
 help / color / mirror / Atom feed
From: Trish Cayetano <trishacayetano@gmail.com>
Subject: Re: How to check if letters are in a string?
Date: Sat, 18 Jul 2015 03:52:44 -0700 (PDT)
Date: 2015-07-18T03:52:44-07:00	[thread overview]
Message-ID: <acd46a1a-d5be-4a9d-9feb-4a23cb9a58ba@googlegroups.com> (raw)
In-Reply-To: <mod9fp$80v$1@speranza.aioe.org>

On Saturday, July 18, 2015 at 6:23:56 PM UTC+8, Nasser M. Abbasi wrote:
> On 7/18/2015 4:00 AM, Trish Cayetano wrote:
> > Hi,
> >
> > How do you check if (exact number of) letters are in a string?
> >
> > 1. This example should PASS because every letter is found in the string
> > LETTERS: HID
> > STRING:  HIDDEN
> >
> 
> I do not follow. The 'D' in 'letters' occur 1 time but it occurs
> 2 times in 'string'. So this is not the _exact number_ of
> letters in the string.
> 
> > 2. This example should FAIL because the letters contain 2 N's but the string only has 1 N.
> > LETTERS: NINE
> > STRING:  HIDDEN
> >
> 
> So why now this fails when 'letters' has more N's than in string, but
> the first case did not fail when 'letters' had less D's than in string?
> 
> I think your problem specifications is not clear.
> 
> --Nasser

Hi Nasser, 
Thanks... This is the concept of Text Twist Game if you know that game... 


  reply	other threads:[~2015-07-18 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18  9:00 How to check if letters are in a string? Trish Cayetano
2015-07-18 10:23 ` Nasser M. Abbasi
2015-07-18 10:52   ` Trish Cayetano [this message]
2015-07-18 11:07   ` Simon Clubley
2015-07-18 11:36 ` Björn Lundin
2015-07-18 12:48   ` Trish Cayetano
replies disabled

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