Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Characters of string
#1
str a="abcdefg012"
str b="bcd012fega"

What function can I use to do a=b?
#2
if(a.len!=b.len) ret
int i
for i 0 a.len
,if(findc(b a[i])<0) ret
ret 1

not tested
#3
if

str a="abcdef001a"
str b="bcd012fega"

ret 1
#4
Can you explain in English?
#5
I'm looking for a function that returns 1 if ALL characters of str b are in str a (combinations)

e.

str a="abcdef001a"
str b="bcd012fega"

ret 0
#6
Don't know such function but can be used findc repeatedly.

Also see strpbrk, strspn and strcspn in MSDN library, maybe it is what you need.
#7
Ok. Thanks.
#8
Forgot findcs and findcn. The same as strpbrk etc.
#9
What do you think about this function?

Code:
Copy      Help
function str'a
int i ii
for i 0 len(a)
,_i=(sqrt(a[i]*a[i]*a[i]*a[i]+1)*a[i])+a[i]
,ii+_i
ret abs(ii)
[/code]
#10
Don't know what is it. Something like Crc32? I would use pow(a[i] 4).
#11
It's a function that converts a string in an only number although the letters are disordered.


Forum Jump:


Users browsing this thread: 1 Guest(s)