berikut langkahnya:
1. buat user object dengan nama nvo_globalreplace
2. Buat object function 'of_globalreplace', 
Arguments : string as_source, string as_old, string
as_new, boolean ab_ignorecase
Return string
--------------------------
Long    ll_Start
Long    ll_OldLen
Long    ll_NewLen
String ls_Source

//Check parameters
If IsNull(as_source) or IsNull(as_old) or
IsNull(as_new) or IsNull(ab_ignorecase) Then
        string ls_null
        SetNull(ls_null)
        Return ls_null
End If

//Get the string lenghts
ll_OldLen = Len(as_Old)
ll_NewLen = Len(as_New)

//Should function respect case.
If ab_ignorecase Then
        as_old = Lower(as_old)
        ls_source = Lower(as_source)
Else
        ls_source = as_source
End If

//Search for the first occurrence of as_Old
ll_Start = Pos(ls_Source, as_Old)

Do While ll_Start > 0
        // replace as_Old with as_New
        as_Source = Replace(as_Source, ll_Start, ll_OldLen,
as_New)
        
        //Should function respect case.
        If ab_ignorecase Then 
                ls_source = Lower(as_source)
        Else
                ls_source = as_source
        End If
        
        // find the next occurrence of as_Old
        ll_Start = Pos(ls_Source, as_Old, (ll_Start +
ll_NewLen))
Loop

Return as_Source
-----------------------------------------------------
3. buat object function 'of_globalreplace'
Arguments : string as_source, string as_old, string
as_new
Return string
------------------------------
//Check parameters

If IsNull(as_source) or IsNull(as_old) or
IsNull(as_new) Then
        string ls_null
        SetNull(ls_null)
        Return ls_null
End If

//The default is to ignore Case
as_Source = of_GlobalReplace (as_source, as_old,
as_new, True)

Return as_Source
----------------------------------------
4. buat object function 'of_getreplace'
Arguments : string as_text
Return : string
---------------------------------
string ls_result
ls_result = as_text

//Remove undesired characters.
ls_result = of_GlobalReplace ( ls_result, "-", "" ) 
ls_result = of_GlobalReplace ( ls_result, "/", "" ) 

Return ls_result
-------------------
5. buat object function 'of_getresult'
Arguments : string as_text, string as_parm
--------------------------------------
String ls_CharSet
ls_CharSet      = of_getreplace (as_text)

Return ls_CharSet
-----------------------------------

SELAMAT MENCOBA



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/NhFolB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------
 INDOPB TURUT BERDUKA CITA UNTUK ACEH & SUMUT 
-----------------------------------------------
IndoPB - Indonesia PB User Group 
To Post a message, send it to: [EMAIL PROTECTED]
To Unsubscribe,send a blank message to: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indopb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke