To the smarter ones of us :)

# Thread: To the smarter ones of us :)

1. Senior Member
Join Date
Dec 1969
Posts
110

## To the smarter ones of us :)

Hello,<BR>a question to the people who know the .test property as I guess that that can help me...<BR><BR>I have a function that changes a sentence like this:<BR>"hello this is a test. test-a-b-c. (do you understand? yes/no)"<BR>into:<BR>"Hello this is a test. Test-A-B-C. (Do you understand? Yes/No)"<BR><BR>In other words it cleans up a sentence removes all capitals and places new ones after specific characters... The functions works well, but the function is too huge, and consumes too much time... I would like to work with the .test attribute, but I don&#039;t know how to use it!!<BR><BR>PLEASE HELP<BR><BR>THANKS<BR><BR>the function:<BR><BR><BR>Function Hoofdletter(wat)<BR> if len(wat)&#062;0 then<BR> wat=lcase(wat)<BR> ar=split(wat," ")<BR> wat=""<BR> for x= 0 to ubound(ar)<BR> wat=wat+ucase(left(ar(x),1))+lcase(mid(ar(x),2))<B R> if x&#060;ubound(ar)then wat=wat&" " <BR> next<BR> if instr(wat,"(")&#062;0 then<BR> ar=split(wat,"(")<BR> wat=""<BR> for x= 0 to ubound(ar)<BR> wat=wat+ucase(left(ar(x),1))+lcase(mid(ar(x),2))<B R> if x&#060;ubound(ar)then wat=wat&"(" <BR> next<BR> end if<BR> if instr(wat,"/")&#062;0 then<BR> ar=split(wat,"/")<BR> wat=""<BR> for x= 0 to ubound(ar)<BR> wat=wat+ucase(left(ar(x),1))+mid(ar(x),2)<BR> if x&#060;ubound(ar)then wat=wat&"/" <BR> next<BR> end if<BR> if instr(wat,"-")&#062;0 then<BR> ar=split(wat,"-")<BR> wat=""<BR> for x= 0 to ubound(ar)<BR> wat=wat+ucase(left(ar(x),1))+mid(ar(x),2)<BR> if x&#060;ubound(ar)then wat=wat&"-" <BR> next<BR> end if<BR> hoofdletter=wat<BR> end if<BR>End Function<BR>

2. jj
Senior Member
Join Date
Dec 1969
Posts
277

## RE: To the smarter ones of us :)

Well I must say the smarter ones of us would have gone and looked up the &#039;.test&#039; function rather than rely on someone else to do it for them.

3. Senior Member
Join Date
Dec 1969
Posts
109

## yeah ur acting like your **** dont stink

yeah ur acting like your **** dont stink

4. Senior Member
Join Date
Dec 1969
Posts
19,082

## Kanny, for a bot, you suck.

the rules are, keep the swear-words in the body text, then it&#039;s a nice surprise. this way you&#039;re ruining the suspense aspect<BR><BR><BR><BR><BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
110

## RE: Kanny, for a bot, you suck.

Thanks for the lovely words...<BR><BR>What have I done wrong??

6. Senior Member
Join Date
Dec 1969
Posts
109

## i dont like u atrax!!!

i dont like u atrax!!!

7. Senior Member
Join Date
Dec 1969
Posts
110

## RE: To the smarter ones of us :)

Sorry, but I am not sure if I have to use the .test property... Does anybody know how I can do the changes without using arrays??? Just give me a hint, or a webpage... I can&#039;t find something useful...

8. Senior Member
Join Date
Dec 1969
Posts
110

## RE: To the smarter ones of us :)

9. Senior Member
Join Date
Dec 1969
Posts
19,082

## RE: To the smarter ones of us :)

to be honest, I&#039;m not 100% sure what the problem is. you weren&#039;t particularly clear about it.

10. Senior Member
Join Date
Dec 1969
Posts
110

## RE: To the smarter ones of us :)

My routine is TOOO big and TOOO slow...<BR>I just want to have a clue how I can improve it...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•