Jump to content
Macro Express Forums

Split String command bug


Recommended Posts

I am having a problem splitting a string into two other strings. I found that if we have a short input string looking like this: "a.b" and we wanna split it at "." , "b" will not get saved. If we change the "b" to "bc" in the input string, it will work just fine, saving "a" to one string, and "bc" to another.

 

Can anyone confirm before I report it?

Link to comment
Share on other sites

I am having a problem splitting a string into two other strings. I found that if we have a short input string looking like this: "a.b" and we wanna split it at "." , "b" will not get saved. If we change the "b" to "bc" in the input string, it will work just fine, saving "a" to one string, and "bc" to another.

 

Can anyone confirm before I report it?

Agreed. It's exactly the sort of sloppy programming I'd have expected (not properly testing fringe conditions), so it's disappointing that I'm not disappointed!

Link to comment
Share on other sites

Agreed. It's exactly the sort of sloppy programming I'd have expected (not properly testing fringe conditions), so it's disappointing that I'm not disappointed!

Thanks Paul, reporting now.

 

If anyone needs a quick work-around here's one:

1. Append " " <space> to the input string before splitting

2. Split string

3. Right trim the last* sub-string created from splitting

 

*If your input string looks like this "a.b.c.d", you only have to worry about "d"

 

 

 

This issue has been assigned the tracking number [iSS9261]

Edited by arekowczarek
Link to comment
Share on other sites

YIKES! I did some tests and it appears that this will happen regardless of the size of the input string as long as the last chunk is a single character. Wow, this can cause some serious problems for me. I might need to revert to be safe. I believe this is the result of recent work they have been doing to improve performance with arrays. I tried 4.1.6 and the problem isn't there. I can't find a copy of 4.1.7, does anyone still have it to confirm?

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...