Shim Ai QiWang Blog
Headlines News :

Steven Martin ( Shim Ai QiWang ) :: Membuat Fungsi Strtr VB 6.0

Written By Unknown on Minggu, 29 Desember 2013 | 12.40

Fungsi Strtr PHP dapat digunakan dalam VB 6.0, Saya telah membuat Fungsi Strtr PHP untuk VB 6.0 bagi sahabat-sahabat programmer. Semoga bermanfaat dan berikut kodenya:

'=========================================================
' Author  : Stephanus B.S (Shim Ai QiWang)
' Website : www.shimaiqiwang.blogspot.com
' Source  : http://shimaiqiwang.blogspot.com/2013/12/membuat-fungsi-strtr-vb-60.html
' Lisence : http://creativecommons.org/licenses/by/4.0/
' Copyleft (c)2013 Shim Ai QiWang. All Rights Reseverd.
'=========================================================
Public Function Strtr(DpmStr As String, DpmFrom As Variant, Optional DpmTo As Variant) As String
On Error Resume Next
    Dim DdStrtr As String: DdStrtr = DpmStr
    Dim DdFrom As Variant, DdTo As Variant, i As Integer
    If IsObject(DpmFrom) = False And IsObject(DpmTo) = False Then
        If IsArray(DpmFrom) = True And IsArray(DpmTo) = True Then
            If IsArray(DpmFrom(0)) = False And IsArray(DpmTo(0)) = False Then
                For i = LBound(DpmFrom) To UBound(DpmFrom)
                    DdStrtr = Replace$(DdStrtr, DpmFrom(i), DpmTo(i))
                Next i
            ElseIf IsArray(DpmFrom(0)) = True Then
                For Each DdFrom In DpmFrom
                    DdStrtr = Replace$(DdStrtr, DdFrom(0), DdFrom(1))
                Next DdFrom
            End If
        ElseIf IsArray(DpmFrom) = True And IsArray(DpmTo) = False Then
            If IsArray(DpmFrom(0)) = False Then
                For Each DdFrom In DpmFrom
                    DdStrtr = Replace$(DdStrtr, DdFrom, DpmTo)
                Next DdFrom
            End If
        ElseIf IsArray(DpmFrom) = False And IsArray(DpmTo) = True Then
            If IsArray(DpmTo(0)) = False Then
                For Each DdTo In DpmTo
                    DdStrtr = Replace$(DdStrtr, DpmFrom, DdTo, 1, 1)
                Next DdTo
            End If
        Else
            DdStrtr = Replace$(DdStrtr, DpmFrom, DpmTo)
        End If
    End If
    Strtr = DdStrtr
End Function



Demikian selesainya Artikel diatas. Kiranya dapat menambah wawasan ilmu pengetahuan, Semoga dapat bermanfaat. Jadilah Orang yang baik dan berguna untuk menjunjung tinggi nama bangsa. Perbanyak kebaikan, maka indah pada waktunya.
Teman-Teman, Sobat Penggemar Komputer Jangan Lupa memberi Sumber di Blog atau Project Aplikasi kamu ya?
Source : http://shimaiqiwang.blogspot.com/2013/12/membuat-fungsi-strtr-vb-60.html
Source : 
http://shimaiqiwang.blogspot.com/2013/12/membuat-fungsi-strtr-vb-60.html

Atas Perhatian dan kunjungannya, Shim Ai QiWang™ mengucapkan terima kasih...

Dengan Hormat,
Shim Ai QiWang ™
Share this post :

Posting Komentar

 
Copyright © 2011. Steven Martin ( Shim Ai QiWang ) - All Rights Reserved
Support : 4Shared | Media Fire | Indo Webster
Created by Steven Martin
Powered by Blogger