473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

subset function for string

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.

Sep 28 '05 #1
2 3769
puzzlecracker wrote:
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.


Take each character in 'a' and try finding it in 'b' (using 'find'
function), and if it fails, return false, otherwise return true after
doing the last character.

V
Sep 28 '05 #2

Victor Bazarov wrote:
puzzlecracker wrote:
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.


Take each character in 'a' and try finding it in 'b' (using 'find'
function), and if it fails, return false, otherwise return true after
doing the last character.

V

Thanks, but I have done something cuter:

string a,b;
.... // init both

a.find_first_not_of(b);

Sep 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: les_ander | last post by:
Hi, I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the...
29
by: Chris Dutrow | last post by:
I searched around on the net for a bit, couldn't find anything though. I would like to find some code for a function where I input A Range Of Integers For example: Function( 1, 100 ); And the...
1
by: agron | last post by:
Hi, I was wondering if you guys have any nth script to reads from table and outputs into a temp table subset of records. There was a nth tool I used to use it was GROUP1 which was written in C...
2
by: Dave | last post by:
Hello all, I have a class that contains a large number of discrete pieces of state information. Any combination of these member variables might be valid for a given object. Any given member...
1
by: Daniel Rucareanu | last post by:
Hello, Does anybody knows how can you delete, in just one step, not using a loop, a subset of the child nodes of a given DOM parent node? The subset will be continous, so for example, if the...
148
by: BillJosephson | last post by:
Want to do OOP. Does c++ have all the abilities of java, or is it some subset? Thanks...
2
by: HuifangZhang | last post by:
Could any one help with recursive functions on generating subsets? Write a function ListSubsets that generates all possible subsets of a given set, where the set is represented by a string of...
9
by: Annalyzer | last post by:
This should be an easy one, but I can't figure it out. frmProvider (data source: tblProvider) displays information about child care providers. Since tblProvider is fairly large, I am using a...
9
by: fgh.vbn.rty | last post by:
Say I have a base class B and four derived classes d1, d2, d3, d4. I have three functions fx, fy, fz such that: fx should only be called by d1, d2 fy should only be called by d2, d3 fz should...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.