tag:blogger.com,1999:blog-6658257106003248170.post697581332535340108..comments2024-03-20T22:38:37.222-06:00Comments on Views from an Advantage Evangelist: Parsing a Custom Error StringChris Franzhttp://www.blogger.com/profile/09097498077009855123noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6658257106003248170.post-711990456787076182010-05-27T09:12:11.807-06:002010-05-27T09:12:11.807-06:00Thanks for the feedback, it makes sense to ensure ...Thanks for the feedback, it makes sense to ensure that the curly braces are in the correct order. In this case the string we are parsing is an Advantage error message which will always be formated with the correct pattern.<br /><br />Checking the order would be much more important if this were a more generic function.Chris Franzhttps://www.blogger.com/profile/09097498077009855123noreply@blogger.comtag:blogger.com,1999:blog-6658257106003248170.post-53358546386564703822010-05-27T02:29:18.224-06:002010-05-27T02:29:18.224-06:00if (iStart > 0 && iEnd > 0)
I wouldn...<i>if (iStart > 0 && iEnd > 0)</i><br />I wouldn't use that since it could fail if the braces are in different order <i>}any text{</i>. Better compare iEnd against iStart instead of 0:<br /><i>if (iStart > 0 && iEnd > iStart)</i>Joachim Dürrhttps://www.blogger.com/profile/16682404551931046186noreply@blogger.com