Sign in to follow this  
Followers 0
Chris_1013

StringReplace hasn't

4 posts in this topic

This seams simple enough to me, but I can't find it in the help file. How do I know if StringReplace hasn't replaced any entries in a string (preferably because there weren't any)? I've checked @error value, but this is always 0.

Chris

Share this post


Link to post
Share on other sites



Well, I can do it by Using StringInStr to check for existance of my string 1st.

Or I can read it to a temporary variable and compare after running StringReplace..

or probably 100 other ways.

Sometimes just helps to talk it out huh?

Share this post


Link to post
Share on other sites

Yeah it sucks that it doesn't return something when it hasn't replaced a thing.

I use this at the moment:

Or I can read it to a temporary variable and compare after running StringReplace..

Share this post


Link to post
Share on other sites

Perhaps we can wishlist this? An @error result would be usefull.


Sitting comfortably behind the code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0