{"id":1183,"date":"2023-07-24T09:00:00","date_gmt":"2023-07-24T09:00:00","guid":{"rendered":"https:\/\/www.naveedulhaq.com\/?p=1183"},"modified":"2023-07-22T02:46:13","modified_gmt":"2023-07-22T02:46:13","slug":"c-substring-methods","status":"publish","type":"post","link":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/","title":{"rendered":"C# Substring Methods"},"content":{"rendered":"\n<p>In C#, substring methods are invaluable for extracting specific portions of strings, manipulating text data, and performing various operations on substrings. Substring methods allow you to work with substrings based on their start and end positions or by specifying a length. This blog will explain the various substring methods available in <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/csharp\/\" target=\"_blank\" rel=\"noreferrer noopener\">C#<\/a>, their usage, and practical examples to demonstrate their functionality.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"using-substring-method\">Using\u00a0Substring\u00a0Method<\/h2>\n\n\n\n<p>The&nbsp;<code>Substring<\/code>&nbsp;method in C# is a widely used string method that allows you to extract a substring from a given string. It has multiple overloads to cater to different scenarios. Here\u2019s the basic syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string result = originalString.Substring(startIndex);\nstring result = originalString.Substring(startIndex, length);\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>startIndex<\/code>: The position where the substring extraction begins. It is a zero-based index, meaning the first character has an index of 0.<\/li>\n\n\n\n<li><code>length<\/code>: (Optional) The number of characters to include in the substring. If not specified, the method will extract all characters from the start index to the end of the string.<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s look at some examples:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"Hello, World!\";\nstring result1 = originalString.Substring(0); \/\/ \"Hello, World!\"\nstring result2 = originalString.Substring(7); \/\/ \"World!\"\nstring result3 = originalString.Substring(0, 5); \/\/ \"Hello\"\n<\/code><\/pre>\n\n\n\n<p>In the first example, we extract the entire string since the&nbsp;<code>startIndex<\/code>&nbsp;is 0. In the second example, the&nbsp;<code>startIndex<\/code>&nbsp;is 7, so the substring begins from the 7th character (\u201cW\u201d) and continues to the end of the string. In the third example, we specify a length of 5, resulting in a substring of the first five characters (\u201cHello\u201d).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"substring-and-index-calculation\">Substring\u00a0and Index Calculation<\/h2>\n\n\n\n<p>Remember that the&nbsp;<code>startIndex<\/code>&nbsp;is zero-based, so the index of the last character is always one less than the length of the string. If the&nbsp;<code>startIndex<\/code>&nbsp;is equal to or greater than the length of the string,&nbsp;<code>Substring<\/code>&nbsp;will return an empty string:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"Hello, World!\";\nstring result4 = originalString.Substring(originalString.Length); \/\/ \"\"\nstring result5 = originalString.Substring(50); \/\/ \"\"\n<\/code><\/pre>\n\n\n\n<p>In both examples above, the&nbsp;<code>startIndex<\/code>&nbsp;is beyond the length of the string, so the method returns an empty string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"working-with-ranges-using-substring\">Working with Ranges using\u00a0Substring<\/h2>\n\n\n\n<p>C# 8.0 introduced a new overload of&nbsp;<code>Substring<\/code>&nbsp;that uses range notation, making it more convenient to work with substrings. Range notation uses the&nbsp;<code>..<\/code>&nbsp;operator to specify a range of characters. It\u2019s essential to enable C# 8.0 features for this to work in your project.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"Hello, World!\";\nstring result6 = originalString&#091;0..5]; \/\/ \"Hello\"\nstring result7 = originalString&#091;7..]; \/\/ \"World!\"\n<\/code><\/pre>\n\n\n\n<p>The first example extracts the substring from index 0 to 4 (inclusive), while the second example starts from index 7 and continues until the end of the string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"substring-for-string-manipulation\">Substring\u00a0for String Manipulation<\/h2>\n\n\n\n<p>Besides extracting substrings,&nbsp;<code>Substring<\/code>&nbsp;is handy for modifying strings. Since strings are immutable in C#, you cannot directly change a single character within a string. However, you can create a new string with a modified substring and reassign it to the original variable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"Hello, World!\";\nstring modifiedString = originalString.Substring(0, 5) + \" Univer\" + originalString.Substring(7);\nConsole.WriteLine(modifiedString); \/\/ \"Hello Universe!\"\n<\/code><\/pre>\n\n\n\n<p>In this example, we modified the substring \u201cWorld\u201d to \u201cUniverse\u201d and created a new string&nbsp;<code>modifiedString<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"remove-method\">Remove\u00a0Method<\/h2>\n\n\n\n<p>If you want to remove a specific portion of the string and return the modified version, you can use the&nbsp;<code>Remove<\/code>&nbsp;method. It is an alternative to&nbsp;<code>Substring<\/code>&nbsp;for string manipulation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"Hello, Universe!\";\nstring modifiedString = originalString.Remove(7, 9);\nConsole.WriteLine(modifiedString); \/\/ \"Hello, !\"\n<\/code><\/pre>\n\n\n\n<p>In this example, we removed the substring starting from index 7 and having a length of 9 characters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"split-method-for-substrings\">Split\u00a0Method for Substrings<\/h2>\n\n\n\n<p>The&nbsp;<code>Split<\/code>&nbsp;method is useful for breaking a string into substrings based on a specified delimiter. It returns an array of substrings split from the original string:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string originalString = \"apple,orange,banana\";\nstring&#091;] fruits = originalString.Split(',');\nforeach (string fruit in fruits)\n{\n    Console.WriteLine(fruit);\n}\n<\/code><\/pre>\n\n\n\n<p>The output will be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apple\norange\nbanana\n<\/code><\/pre>\n\n\n\n<p>Here, the original string was split at each comma (<code>,<\/code>), and the resulting substrings were stored in the&nbsp;<code>fruits<\/code>&nbsp;array.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>In C#, the Substring methods provide powerful tools for extracting and manipulating portions of strings. The Substring and Remove methods offer perfect solutions, whether you need to extract specific characters or modify substrings. Additionally, the\u00a0Split\u00a0method allows you to break strings into substrings based on delimiters. Understanding these methods and their various applications will enhance your text-processing capabilities in C#.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.naveedulhaq.com\/index.php\/category\/dot-net-core\/\" target=\"_blank\" rel=\"noreferrer noopener\">More C# \/ .NET Tutorials Here!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In C#, substring methods are invaluable for extracting specific portions of strings, manipulating text data, and performing various operations on substrings. Substring methods allow you&#8230;<\/p>\n","protected":false},"author":3,"featured_media":641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[11,8,62,37,32,23,56],"class_list":["post-1183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-core","tag-dot-net-core","tag-dot-net-framework","tag-asp-net","tag-c","tag-developer","tag-development","tag-visual-studio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C# Substring Methods - Naveed Ul-Haq&#039;s blog<\/title>\n<meta name=\"description\" content=\"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C# Substring Methods - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T09:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"240\" \/>\n\t<meta property=\"og:image:height\" content=\"240\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abdul Mannan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abdul Mannan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/\"},\"author\":{\"name\":\"Abdul Mannan\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/8babf3cd198e47e5c727f67880ea7977\"},\"headline\":\"C# Substring Methods\",\"datePublished\":\"2023-07-24T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/\"},\"wordCount\":603,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"keywords\":[\".net core\",\".net framework\",\"asp.net\",\"c#\",\"developer\",\"development\",\"visual-studio\"],\"articleSection\":[\".NET\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/\",\"name\":\"C# Substring Methods - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"datePublished\":\"2023-07-24T09:00:00+00:00\",\"description\":\"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/240px-.NET_Logo.svg_.png\",\"width\":240,\"height\":240,\"caption\":\".net\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/dot-net-core\\\/c-substring-methods\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C# Substring Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/8babf3cd198e47e5c727f67880ea7977\",\"name\":\"Abdul Mannan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g\",\"caption\":\"Abdul Mannan\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C# Substring Methods - Naveed Ul-Haq&#039;s blog","description":"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/","og_locale":"en_GB","og_type":"article","og_title":"C# Substring Methods - Naveed Ul-Haq&#039;s blog","og_description":"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_published_time":"2023-07-24T09:00:00+00:00","og_image":[{"width":240,"height":240,"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","type":"image\/png"}],"author":"Abdul Mannan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abdul Mannan","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#article","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/"},"author":{"name":"Abdul Mannan","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/8babf3cd198e47e5c727f67880ea7977"},"headline":"C# Substring Methods","datePublished":"2023-07-24T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/"},"wordCount":603,"commentCount":0,"publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","keywords":[".net core",".net framework","asp.net","c#","developer","development","visual-studio"],"articleSection":[".NET"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/","name":"C# Substring Methods - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","datePublished":"2023-07-24T09:00:00+00:00","description":"The Substring methods in C# provide powerful tools for extracting and manipulating portions of strings. Read this guide for more details!","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2021\/11\/240px-.NET_Logo.svg_.png","width":240,"height":240,"caption":".net"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/c-substring-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"C# Substring Methods"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]},{"@type":"Person","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/8babf3cd198e47e5c727f67880ea7977","name":"Abdul Mannan","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7021bf97f2da3c29882f0e194e341d6abcc2b18abbbbf1e8ea688017b2323d21?s=96&d=mm&r=g","caption":"Abdul Mannan"}}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=1183"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/1183\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media\/641"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/categories?post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/tags?post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}