The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Ksbunker on January 01, 2007, 06:58:51 AM

Title: String manipulation (Replace)
Post by: Ksbunker on January 01, 2007, 06:58:51 AM
In VB, I believe the function im looking for is "replace(string, find, replace)"

Is this function in any of the includes I can't seem to find it? If its not.

How would I go about doing this?

Cheers
Title: Re: String manipulation (Replace)
Post by: hutch-- on January 01, 2007, 07:08:51 AM
There is a replace procedure in the masm32 library. Ensure you understand how to allocate enough memory for the output buffer if your replacement is larger than the target text.
Title: Re: String manipulation (Replace)
Post by: Ksbunker on January 01, 2007, 08:08:06 AM
I cannot seem to locate any replace function, perhaps I have an outdated version of masm32.inc?

    szappend    PROTO :DWORD,:DWORD,:DWORD
    szCatStr    PROTO :DWORD,:DWORD
    szCmp       PROTO :DWORD,:DWORD
    szCmpi      PROTO :DWORD,:DWORD,:DWORD
    szCopy      PROTO :DWORD,:DWORD
    szLeft      PROTO :DWORD,:DWORD,:DWORD
    szLen       PROTO :DWORD
    szLower     PROTO :DWORD
    szLtrim     PROTO :DWORD,:DWORD
    szMid       PROTO :DWORD,:DWORD,:DWORD,:DWORD
    szMultiCat  PROTO C :DWORD,:DWORD,:VARARG
    szRemove    PROTO :DWORD,:DWORD,:DWORD
    szRev       PROTO :DWORD,:DWORD
    szRight     PROTO :DWORD,:DWORD,:DWORD
    szRtrim     PROTO :DWORD,:DWORD
    szTrim      PROTO :DWORD
    szUpper     PROTO :DWORD
Title: Re: String manipulation (Replace)
Post by: hutch-- on January 01, 2007, 11:04:56 AM
I would imagine so, version 9.0 of masm32 has a module that is documented in the masmlib help file with a matching library module and an include file. The module dates 11/30/2005.