ник: Lukas
Может не только цифирьки а весь Non&LowerCase?:
Public Function CaseToBin2(strParam As String) As String
Dim N() As Byte
Dim L() As Byte
Dim i As Integer
Const ZERO As String = "0"
Const ONE As String = "1"
If StrComp(LCase(strParam), strParam, vbBinaryCompare) = 0 Then Exit Function
L() = LCase(strParam)
N() = strParam
CaseToBin2 = String(Len(strParam), ZERO)
Dim intStep As Integer
intStep = LenB("A")
For i = 0 To UBound(L) Step intStep
If L(i) > N(i) Then Mid$(CaseToBin2, i / intStep + 1, 1) = ONE
Next
End Function
|
На 74% быстрее на образцах данных + экономия на диске.