AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SIZEOF command against strings

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Question
Guest





PostPosted: Fri Feb 02, 2007 2:32 am    Post subject: SIZEOF command against strings Reply with quote

Is there an equivalent SIZEOF command in ahk to determine size of content strings?
Back to top
Dave72



Joined: 27 Jan 2007
Posts: 30
Location: Canada

PostPosted: Fri Feb 02, 2007 3:41 am    Post subject: Reply with quote

Not sure what SIZEOF is.. but I use StringLen to get the number of chars in a string.
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 2951
Location: Minnesota

PostPosted: Fri Feb 02, 2007 4:07 am    Post subject: Reply with quote

Yes, you can use the StringLen command or the StrLen() function.
Back to top
View user's profile Send private message
Question
Guest





PostPosted: Fri Feb 02, 2007 4:13 am    Post subject: Reply with quote

I am sorry, the string, would be an array, so I am attempting to hope to find out how many strings are in the array. Sorry for being confusing Cool
Back to top
nick



Joined: 24 Aug 2005
Posts: 549
Location: Berlin / Germany

PostPosted: Fri Feb 02, 2007 6:01 am    Post subject: Reply with quote

How do you create your array?
_________________
nick Wink
Back to top
View user's profile Send private message
Dippy46



Joined: 06 Jul 2004
Posts: 171
Location: Manchester, England.

PostPosted: Fri Feb 02, 2007 1:17 pm    Post subject: Reply with quote

@Question,

Sizeof reports the amount of space allocated to a string NOT the amount being used. The equivalent AHK commnd is.

Code:

SIZEOF := VarSetCapacity(String)


Which of course is not necessarily the same as STRLEN.

Regards
Dave.
_________________
Simple ideas lie within reach, only of complex minds
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Fri Feb 02, 2007 2:09 pm    Post subject: Reply with quote

Quote:
so I am attempting to hope to find out how many strings are in the array
AHKs help wrote:
Quote:
it is safest to use the zero element (MyArray0) to determine how many items were actually produced by the command.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group