HMaxF Visual Basic ANSI String (ActiveX DLL)
Last Revision Compiled Sunday, 12th August 2001.

This VB Class (ActiveX DLL) is created to replace VB UNICODE string storage and operation.
As its name implied, this DLL will store the string in ANSI (single byte) Not Unicode (double byte).
It required half memory storage for string because the use of ANSI instead of UNICODE.
It should be faster in operation, such as Insert at the end or at the start.
It does not required to put NULL character at the end of the string like in C/C++.

Please report any bug so I can notify everybody who use this Class
If you think there is a function need to be added please tell me

All input/output is in byte array [byte array is the string]

How To Use:
1. From project reference add (browse) the VBANSIString.dll
2. In the Form or module declare a variable as VBANSIString

Property / Sub detail and parameter:

[sub] AddByte (bytevalue as byte )
add one byte (one ASCII) to the end of the string

[sub] AddInteger (integervalue as integer)
add two bytes to the end of the string

[sub] AddLong (longvalue as long)
add four bytes to the end of the string

[property]
[let] Content (Source() as byte)
store a new content from bytes array, ex: X.Content = MyBytesString
[get] Content 
return bytes array of the content, ex: MyBytesString = X.Content
[warning: if Length is zero, it still will return one byte array]

[sub] GetFromFile (filename as string)
store a new content from a file [note: filename must exist, otherwise error]

[sub] Insert (StartPos as long, Source() as byte)
insert bytes array to the content, StartPos must be between 1 to StrLength
example: 
insert from the start: X.Insert 1 MyBytesString
insert in middle: X.Insert 5 MyBytesString 'insert from position number 5              
[sub] InsertEnd (Source() as byte)
insert bytes array to the content from the end
example: X.InsertEnd MyBytesString

insert to the middle: X.Insert 10 MyBytesString [insert from postion number 10]

[function] Left (Total as Long) as byte ()
return a total byte array from the left / start position

[property]
[let] Length (Total as long)
Resize the bytes array
[get] Length as long
Return the total byte array in used

[function] Mid (StartPos as long, Total as long) as byte ()
return a byte array, ex: MyBytesString = X.Mid (3, 7) 'return 7 byte array from position number 3

[sub] PutToFile(filename as string)
save the byte array content into the file [warning: if filename is existed then it will overwrite]
  
[sub] Remove (StartPos as long, Total as long)
remove / delete bytes array from content, ex: X.Remove 5, 10 'remove 10 bytes from position 5

[sub] Replace (StartPos as long, Total as long, Source() as byte)
Replace byte array, ex: X.Replace 5, 7, X.Right(3) 'Replace 7 bytes start from position 5 with 3 bytes from right of the string.

[sub] Reverse
Reserve the string, ex: original string: "I am Harry" become "yrraH ma I"

[function] Right (Total as long) as byte ()
get from right side a Total byte

[function] Search (Source() as byte) as long
Search from start position for exact value of Source(), if found it will return the position, zero if not found.

[function] SearchReverse (Source() as byte) as long
Same like Search, SearchReverse instead start search from the end position.

[sub] ToLowerCase
will convert all character to lower case, ex: from "Hi, I am Harry" to "hi, i am harry"

[sub] ToProperCase
will convert all character to proper case (UpperCase every space), ex: from "hi, i am harry" to "Hi, I am Harry"

[sub] ToUpperCase
will convert all character to upper case, ex: from "hi, i am harry" to "HI, I AM HARRY"


DISCLAIMER:
I, the author, will not be liable for any damage caused by this software,
This ActiveX DLL and the source code can be use freely, but use it at your own risk.

