Re: subset function for string in c++
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 11:12:05 -0700
"puzzlecracker" <ironsel2000@xxxxxxxxx> writes:
> basically, I need to find out wether charecters in string a are subset
> of string b..
>
> example
>
> a: rx b:rwx
> that shall return true.
/* Returns true if A is a subset of B, false otherwise. */
bool
is_subset (const char *a, const char *b) {
return a[strspn (a, b)] == '\0';
}
--
"Writing is easy.
All you do is sit in front of a typewriter and open a vein."
--Walter Smith
.
- Prev by Date: Re: programming with large memory requirements
- Next by Date: Re: Constant interruptions and left brain - right brain thing
- Previous by thread: Am I the only one who has a hard time getting up from the computer?
- Next by thread: Re: subset function for string in c++
- Index(es):
Relevant Pages
|