Skip to main content

Good article on getting the right characters of a string in C#

Left, Right, SubString C#


 https://kodify.net/csharp/strings/left-right-mid/#left-right-and-mid-string-segments-in-c


FeatureDescription C# equivalent
Left Get specific number of characters (count) from left part string.Substring(0, count)
RightGet specific number of characters (count) from right sidestring.Substring(string.Length
- count, count)
MidGet a specific number of characters (count) starting at a certain point (index)string.Substring(index, count)
MidGet all characters starting at a certain point (index)string.Substring(index)


Comments

Popular posts from this blog

Javascript Form Validation

It's real simple. All you need to do is call a javascript function in a html  " onsubmit " in the form tag as a javascript return, like this       <form method="post" action="dosomething.php" onsubmit="return validateForm();"> If the code completes ok, the form is then sent to the page listed in "action" http://www.w3schools.com/js/js_form_validation.asp If the function specified in the onsubmit returns false, then the form is not sent to the page mentioned in action.