473,406 Members | 2,710 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,406 software developers and data experts.

Possibilizing.

If i had:
strName = "Sam"

Is there a function where it would separate strName into all possibilities using periods, for example:

Sam
S.am
Sa.m
S.a.m

Thanks in advance
Jul 17 '07 #1
2 851
kadghar
1,295 Expert 1GB
sure, you can always create it as a

public function periods(str1 as string) as string
dim array() as string
(...)
periods = array
end function

Use Mid$ to cut the string, and think how would you do it. Notice that you'll have 2^(n-1) posibilities, where n is the number of letters in your word, so

redim array (1 to 2^(len(str1)-1))

woudl be useful.

HTH
Jul 17 '07 #2
sure, you can always create it as a

public function periods(str1 as string) as string
dim array() as string
(...)
periods = array
end function

Use Mid$ to cut the string, and think how would you do it. Notice that you'll have 2^(n-1) posibilities, where n is the number of letters in your word, so

redim array (1 to 2^(len(str1)-1))

woudl be useful.

HTH
I know what to do, just not how to do it. Could you make a function for me?
Jul 18 '07 #3

Sign in to post your reply or Sign up for a free account.

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.