Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

str_replace

4 posts in Product Futures Discussion Last posting was on 2003-09-20 16:28:56.0Z
Carl Kayser Posted on 2003-02-28 19:03:41.0Z
From: "Carl Kayser" <kayser_c@bls.gov>
Subject: str_replace
Date: Fri, 28 Feb 2003 14:03:41 -0500
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <5Rmts713CHA.181@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 146.142.35.25
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:977
Article PK: 95218

str_replace (arg1, arg2, ' ') replaces arg2 with a space within arg1.

Similarly str_replace (arg1, arg2, '') replaces arg2 with a space within
arg1.

And str_replace (arg1, arg2, NULL) returns NULL.

Wouldn't it make more sense for the last to strip out arg2 from arg1? If
not, how does one do this functionality? Note that stuff (arg1, start, len,
NULL) strips away len characters; it does not return NULL.


Steve Olson Posted on 2003-09-18 17:18:52.0Z
Message-ID: <3F69E825.6000106@sybase.nospamminplease.com>
From: Steve Olson <olson@sybase.nospamminplease.com>
Organization: Sybase, Inc.
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.ase.product_futures_discussion
To: Carl Kayser <kayser_c@bls.gov>
Subject: Re: str_replace
References: <5Rmts713CHA.181@forums.sybase.com>
In-Reply-To: <5Rmts713CHA.181@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: ravana.sybase.com
X-Original-NNTP-Posting-Host: ravana.sybase.com
Date: 18 Sep 2003 10:18:52 -0700
X-Trace: forums-1-dub 1063905532 157.133.112.211 (18 Sep 2003 10:18:52 -0700)
X-Original-Trace: 18 Sep 2003 10:18:52 -0700, ravana.sybase.com
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1389
Article PK: 95616

The str_replace() builtin now handles a null third argument, such that
all occurrences of arg2 within string arg1 are effectively removed
from the string (replaced with 'nothing')

This was done in 12.5.0.3.

Regards,
Steve

Carl Kayser wrote:
> str_replace (arg1, arg2, ' ') replaces arg2 with a space within arg1.
>
> Similarly str_replace (arg1, arg2, '') replaces arg2 with a space within
> arg1.
>
> And str_replace (arg1, arg2, NULL) returns NULL.
>
> Wouldn't it make more sense for the last to strip out arg2 from arg1? If
> not, how does one do this functionality? Note that stuff (arg1, start, len,
> NULL) strips away len characters; it does not return NULL.
>
>


Carl Kayser Posted on 2003-09-20 13:40:56.0Z
From: "Carl Kayser" <kayser_c@bls.gov>
Newsgroups: sybase.public.ase.product_futures_discussion
References: <5Rmts713CHA.181@forums.sybase.com> <3F69E825.6000106@sybase.nospamminplease.com>
Subject: Re: str_replace
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Original-NNTP-Posting-Host: 146.142.35.25
Message-ID: <3f6c596e$1@forums-2-dub>
X-Original-Trace: 20 Sep 2003 06:43:10 -0700, 146.142.35.25
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 20 Sep 2003 06:37:08 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 20 Sep 2003 06:40:56 -0700
X-Trace: forums-1-dub 1064065256 10.22.108.75 (20 Sep 2003 06:40:56 -0700)
X-Original-Trace: 20 Sep 2003 06:40:56 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1391
Article PK: 95618

Thanks for the update . . . but the behavior I've described still exists in
12.5.0.3 EBF 11332 and I don't see a newer release at the Sybase download
site for Solaris.

For which release/platform do you see this change? Perhaps 12.5.1?

"Steve Olson" <olson@sybase.nospamminplease.com> wrote in message
news:3F69E825.6000106@sybase.nospamminplease.com...
> The str_replace() builtin now handles a null third argument, such that
> all occurrences of arg2 within string arg1 are effectively removed
> from the string (replaced with 'nothing')
>
> This was done in 12.5.0.3.
>
> Regards,
> Steve
>
> Carl Kayser wrote:
> > str_replace (arg1, arg2, ' ') replaces arg2 with a space within arg1.
> >
> > Similarly str_replace (arg1, arg2, '') replaces arg2 with a space within
> > arg1.
> >
> > And str_replace (arg1, arg2, NULL) returns NULL.
> >
> > Wouldn't it make more sense for the last to strip out arg2 from arg1?
If
> > not, how does one do this functionality? Note that stuff (arg1, start,
len,
> > NULL) strips away len characters; it does not return NULL.
> >
> >
>


Rob Verschoor Posted on 2003-09-20 16:28:56.0Z
From: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Newsgroups: sybase.public.ase.product_futures_discussion
References: <5Rmts713CHA.181@forums.sybase.com> <3F69E825.6000106@sybase.nospamminplease.com> <3f6c596e$1@forums-2-dub>
Subject: Re: str_replace
Lines: 54
MIME-Version: 1.0
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Original-NNTP-Posting-Host: a66246.upc-a.chello.nl
Message-ID: <3f6c80d0$1@forums-2-dub>
X-Original-Trace: 20 Sep 2003 09:31:12 -0700, a66246.upc-a.chello.nl
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 20 Sep 2003 09:25:06 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 20 Sep 2003 09:28:56 -0700
X-Trace: forums-1-dub 1064075336 10.22.108.75 (20 Sep 2003 09:28:56 -0700)
X-Original-Trace: 20 Sep 2003 09:28:56 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1392
Article PK: 95621

The behaviour where a NULL argument is specified as the 3rd argument
actually removes the corresponding characters from the source string,
is new in 12.5.1. In 12.5.0.3 (up to ESD#3, at least), you'll get a
NULL result when you try this.

Rob V.

"Carl Kayser" <kayser_c@bls.gov> wrote in message
news:3f6c596e$1@forums-2-dub...
> Thanks for the update . . . but the behavior I've described still
exists in
> 12.5.0.3 EBF 11332 and I don't see a newer release at the Sybase
download
> site for Solaris.
>
> For which release/platform do you see this change? Perhaps 12.5.1?
>
> "Steve Olson" <olson@sybase.nospamminplease.com> wrote in message
> news:3F69E825.6000106@sybase.nospamminplease.com...
> > The str_replace() builtin now handles a null third argument, such
that
> > all occurrences of arg2 within string arg1 are effectively
removed
> > from the string (replaced with 'nothing')
> >
> > This was done in 12.5.0.3.
> >
> > Regards,
> > Steve
> >
> > Carl Kayser wrote:
> > > str_replace (arg1, arg2, ' ') replaces arg2 with a space within
arg1.
> > >
> > > Similarly str_replace (arg1, arg2, '') replaces arg2 with a
space within
> > > arg1.
> > >
> > > And str_replace (arg1, arg2, NULL) returns NULL.
> > >
> > > Wouldn't it make more sense for the last to strip out arg2 from
arg1?
> If
> > > not, how does one do this functionality? Note that stuff (arg1,
start,
> len,
> > > NULL) strips away len characters; it does not return NULL.
> > >
> > >
> >
>
>
>