|
-
MID Take two
Mid function I dreamed up for .Net
Very slow as far as I can tell lol
Ok what am I doing wrong?
Private Function sMid(ByVal Str As String, ByVal Position As Int32, ByVal
Length As Int32) As String
Dim b() As Byte
Dim s As String
Dim h As New System.Text.ASCIIEncoding()
b = h.ASCII.GetBytes(Str)
Dim x As Int32
Dim ch As Char
Dim sb As StringBuilder
Position = Position - 1
For x = Position To ((Position + (Length)) - 1)
s = s & Chr(b.GetValue(x))
Next
Return s
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks