tag:blogger.com,1999:blog-7583693824613474736.post8618839743086717937..comments2023-06-06T07:04:37.545-03:00Comments on DeveX++: C# Left, Mid and Right functionsFelipe Fiali de Sáhttp://www.blogger.com/profile/17429095645630751371noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7583693824613474736.post-49032366214911760272013-01-25T21:00:02.305-02:002013-01-25T21:00:02.305-02:00Awesome. That was perfect. Thanks.Awesome. That was perfect. Thanks.Unknownhttps://www.blogger.com/profile/15703766882724787486noreply@blogger.comtag:blogger.com,1999:blog-7583693824613474736.post-22278508688207966432012-10-04T16:14:52.588-03:002012-10-04T16:14:52.588-03:00Thank you for your feedback.
The code that I pos...Thank you for your feedback. <br /><br />The code that I posted reproduces the VB functions in C#, so it wouldn't really make sense to keep it as a 1-based index like VB was. But thank you anyway.<br />Felipe Fiali de Sáhttps://www.blogger.com/profile/17429095645630751371noreply@blogger.comtag:blogger.com,1999:blog-7583693824613474736.post-78594504221127910422012-10-04T16:01:15.481-03:002012-10-04T16:01:15.481-03:00These work, but if you really want "Mid"...These work, but if you really want "Mid" to function like Visual Basic then this needs an update (though I think your implementation is better in a .Net sense). Anyway, VB's Mid is based on a index starting at 1 instead of .Net's standard 0 (for compaitiblity dating back to the old school basic days).<br /><br />In the mid function, the following would make it behave like VB by changing the start index:<br /><br />return value.Substring(startPosition - 1, endPosition); Anonymousnoreply@blogger.com