Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 22-08-2005, 05:24 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Jul 2005
Location: coimbatore
Posts: 30
Default vb stringlength


hi

i want code for vb find string length with out len function.

by,
saravana.
saro_gn is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 22-08-2005, 05:59 PM   #2 (permalink)
Wise Old Owl
 
siriusb's Avatar
 
Join Date: May 2005
Location: Chennai, India, Asia, the Earth, the Solar system, the Milky Way, the Local group, this Universe.
Posts: 1,171
Default

Here's my try:
Code:
Dim strtemp As String, x As String
Dim i As Integer

strtemp = InputBox("Enter string here")

Do
    i = i + 1
    x = Mid(strtemp, i, 1)
    DoEvents
Loop While x <> ""

MsgBox i - 1
__________________
http://myxp.blogspot.com
-----------------------
Winchester 3200+ @2,500MHz
LeadTek 7900GT VOLT MODDED @ 680 core, 1800 mem
2x1GB Transcend DDR400 @ DDR454 2.5,3,3,5,1T
siriusb is offline  
Old 22-08-2005, 11:48 PM   #3 (permalink)
Wise Old Owl
 
siriusb's Avatar
 
Join Date: May 2005
Location: Chennai, India, Asia, the Earth, the Solar system, the Milky Way, the Local group, this Universe.
Posts: 1,171
Default

Here's a slightly modified version:
Code:
On Error Resume Next

Dim strtemp As String, x As String
Dim i As Integer

strtemp = InputBox("Enter string here")

Do
    i = i + 1
    x = ""
    x = Mid(strtemp, i, 1)
Loop While x <> ""

MsgBox i - 1
__________________
http://myxp.blogspot.com
-----------------------
Winchester 3200+ @2,500MHz
LeadTek 7900GT VOLT MODDED @ 680 core, 1800 mem
2x1GB Transcend DDR400 @ DDR454 2.5,3,3,5,1T
siriusb is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by abhidev
- by Sujeet
- by Sarath
- by Krow

Advertisement




All times are GMT +5.5. The time now is 08:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2