{"id":437,"date":"2020-04-27T13:31:36","date_gmt":"2020-04-27T12:31:36","guid":{"rendered":"https:\/\/ibex.tech\/csharp\/?p=437"},"modified":"2025-04-23T15:20:57","modified_gmt":"2025-04-23T14:20:57","slug":"using-strings-extracting","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/c-sharp\/strings\/using-strings-extracting","title":{"rendered":"Using Strings-Extracting"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Convert comma seperated string to a list<\/h4>\n\n\n\n<p>See <a href=\"\/csharp\/c-sharp\/strings\/encodedecode-strings\">here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Limit string length<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tif (MyString.Length > MaxLength)\n\t\tMyString = MyString.Substring(0, MaxLength);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Get string from character position # (Remove text from beginning or end of string)<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Getting beginning of a string<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\tif (TempString.LastIndexOf(\"\\\\\") &gt;= 0)\n\t\tTempString = TempString.Substring(0, (TempString.LastIndexOf(\"\\\\\")));<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Getting end of string<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\tif (TempString.LastIndexOf(\"\\\\\") &gt;= 0)\n\t\tTempString = TempString.Substring(TempString.LastIndexOf(\"\\\\\") + 1);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Convert comma seperated string to a list See here. Limit string length Get string from character position # (Remove text from beginning or end of string) Getting beginning of a string Getting end of string<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-437","post","type-post","status-publish","format-standard","hentry","category-strings"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=437"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/437\/revisions"}],"predecessor-version":[{"id":1399,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/437\/revisions\/1399"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}