Suggestion for SubstringOrDefault To Avoid Out Of Range Error with Substring Command and Having to First Check Length Is Longer #111370
Replies: 2 comments 2 replies
-
Word for word an exact duplicate of #110794 |
Beta Was this translation helpful? Give feedback.
2 replies
-
Closing this duplicate thread. All discussions should go to #110794 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When transferring data from one system to another or inserting user defined data you may not know how long the resulting string is but if you are inserting into a field that is 100 chars then if <= the max then you want to add it all but if over you may want to insert up to the limit.
For this reason having SubstringOrDefault would be handy and would save you having to only call the function if the string is at least that length to avoid an out of bounds error message.
Here is a definition of what it could look like:
Beta Was this translation helpful? Give feedback.
All reactions