28 th Jun 2022 20:42:24
Hai Friend , Sign In
Chennai City
G. K.
Tamil Nadu Government Holiday List 2018 in English and Tamil   *   Trichy: Wanted - PHP, MySql Programmers. Contact trichy people only 84894 28 444.   *   Indian Railways New Train Number List [Search / Enquiry / Locator / Finder]   *   பன்றிக் காய்ச்சல் பற்றி அறிந்து கொள்ளுங்கள் (Swine Flu H1N1)
See Also
Filter Function Filter Function
String Functions String Functions
Visual Basic Functions Visual Basic Functions
Visual Basic Home Visual Basic Home
Description  Syntax  Return Datatype  Example  Migration

Replace Function - Visual Basic 6.0 (VB 6.0)

Returns a string in which a specified substring has been replaced with another substring a specified number of times.
Replace(expression, find, replace[, start[, count[, compare]]])
Parameter Description
expression Required. String expression containing substring to replace.
find Required. Substring being searched for.
replace Required. Replacement substring.
start Optional. Default 1. Position within expression where substring search is to begin.
count Optional. Default -1 (All). Number of substring substitutions to perform.
compare Optional. Default vbBinaryCompare (0). Numeric value indicating the kind of comparison to use when evaluating substrings.

Return Data type:

Dim St as String
St = "Chennaiiq"

Statement Result Remark
Replace(St, "n", "m") Chemmaiiq  
Replace(St, "N", "m") Chennaiiq  
Replace(St, "n", "M") CheMMaiiq  
Replace(St, "n", "m", 5) maiiq  
Replace(St, "n", "m", 4, 1) mnaiiq  
Replace("", "n", "m")   Empty String
Replace(null, "n", "m") Error Invalid use of null
Replace(St, "", "m") Chennaiiq (Copy of Expression)
Replace(St, "n", "") Cheaiiq  
Replace(St, "n", "m", 20)   Empty String
Replace(St, "n", "m", 1, 0) Chennaiiq  
Go to top

Migration from Visual Basic 6.0 (VB 6.0) to
  Replace Function in VB Script (VBS)
  Replace Function in JScript (JS)
  Replace Function in ASP (Active Server Page)
  Replace Function in PHP Script
  Replace Function in MS-Access
  Replace Function in MS SQL Server
  Replace Function in Oracle
  Replace Function in C Language
  Replace Function in C++ Language
  Replace Function in Foxpro
  Replace Function in Fortran
  Replace Function in MS Excel Sheet
Go to top

© 2021 Chennaiiq.com. All Rights Reserved.