{"id":209,"date":"2020-08-31T08:13:26","date_gmt":"2020-08-31T08:13:26","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/cplusplus\/?p=209"},"modified":"2020-08-31T08:13:26","modified_gmt":"2020-08-31T08:13:26","slug":"c-string-manipulation","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/","title":{"rendered":"C++ String Manipulation"},"content":{"rendered":"<p>In this lesson, you will learn about string manipulation in C++. We&#8217;ll cover all the various operations that you can do with strings.<\/p>\n<ol>\n<li><a href=\"#t1\">C-Type Strings<\/a><\/li>\n<li><a href=\"#t2\">C++ String Object<\/a><\/li>\n<li><a href=\"#t3\">String Manipulation Functions from C<\/a><\/li>\n<li><a href=\"#t4\">String Manipulation with C++ String Class<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. C-Type Strings<\/strong><\/h4>\n<p>As you know, C++ supersets the C language. Therefore, it supports string functionalities from C. This is also called C-String. Strings in C are <a href=\"https:\/\/kindsonthegenius.com\/cplusplus\/c-arrays\/#t2\" target=\"_blank\" rel=\"noopener noreferrer\">1-dimensional array<\/a> of characters that is terminated by a null character, &#8216;\\0&#8217; (ASCII code for 0).<\/p>\n<p>To define a C-string in C++ use the code below;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #333399; font-weight: bold;\">char<\/span> name[] <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Kindson\"<\/span>;\r\n<\/pre>\n<p>In the code above, the string name is created and holds 7 characters.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #333399; font-weight: bold;\">char<\/span> str[<span style=\"color: #0000dd; font-weight: bold;\">4<\/span>] <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Kindson\"<\/span>;\r\n\t \r\n<span style=\"color: #333399; font-weight: bold;\">char<\/span> str[] <span style=\"color: #333333;\">=<\/span> {<span style=\"color: #0044dd;\">'K'<\/span>,<span style=\"color: #0044dd;\">'i'<\/span>,<span style=\"color: #0044dd;\">'n'<\/span>, <span style=\"color: #0044dd;\">'d'<\/span>, <span style=\"color: #0044dd;\">'s'<\/span>, <span style=\"color: #0044dd;\">'o'<\/span>, <span style=\"color: #0044dd;\">'n'<\/span>, <span style=\"color: #0044dd;\">'\\0'<\/span>};\r\n\r\n<span style=\"color: #333399; font-weight: bold;\">char<\/span> str[<span style=\"color: #0000dd; font-weight: bold;\">4<\/span>] <span style=\"color: #333333;\">=<\/span> {<span style=\"color: #0044dd;\">'H'<\/span>,<span style=\"color: #0044dd;\">'e'<\/span>,<span style=\"color: #0044dd;\">'l'<\/span>, <span style=\"color: #0044dd;\">'l'<\/span>, <span style=\"color: #0044dd;\">'o'<\/span>, <span style=\"color: #0044dd;\">'\\0'<\/span>};\r\n<\/pre>\n<p>The program below uses a C-type string to read a name from the input. Then displays the name to the output.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span> () {\r\n\t<span style=\"color: #888888;\">\/\/you must provide a size<\/span>\r\n\t<span style=\"color: #333399; font-weight: bold;\">char<\/span> name[<span style=\"color: #0000dd; font-weight: bold;\">20<\/span>];\r\n\tcout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Please enter your name: \"<\/span>;\r\n\tcin <span style=\"color: #333333;\">&gt;&gt;<\/span> name;\r\n\tcout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Hello \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> name <span style=\"color: #333333;\">&lt;&lt;<\/span> endl;\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. C++ String Object<\/strong><\/h4>\n<p>C++ also provides it&#8217;s own string class. So you can create string object. This class is provided by the standard C++ library. Unlike character array from C, the C++ string does not have a fixed length.\u00a0 For example, the code below, reads and prints the user&#8217;s name but without knowing the size of the name:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ Example with C++ String<\/span>\r\n<span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span> () {\r\n\t<span style=\"color: #888888;\">\/\/ size is not needed<\/span>\r\n\tstring name;\r\n\tcout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"What is your name: \"<\/span>;\r\n\tcin <span style=\"color: #333333;\">&gt;&gt;<\/span> name;\r\n\tcout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Welcome \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> name <span style=\"color: #333333;\">&lt;&lt;<\/span> endl;\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. String Manipulation Methods (from C)<\/strong><\/h4>\n<p>These are methods used for string manipulation. You need to understand these functions to be get things done with strings.<\/p>\n<p>See table below:<\/p>\n<table class=\"table table-bordered\">\n<tbody>\n<tr style=\"background-color: #f7f6f3;\">\n<th>SN<\/th>\n<th>Method and description<\/th>\n<\/tr>\n<tr>\n<td class=\"ts\">1<\/td>\n<td><b>strcpy(string1, string2)<\/b><\/p>\n<p>Copies string string2 into string string1.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">2<\/td>\n<td><b>strcat(string1, string2)<\/b><\/p>\n<p>Concatenates string string2 onto the end of string string1.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">3<\/td>\n<td><b>strlen(string1)<\/b><\/p>\n<p>Returns the length of string string1.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">4<\/td>\n<td><b>strcmp(string1, string2)<\/b><\/p>\n<p>Returns 0 if string1 and string2 are the same; less than 0 if string1&lt;string2; greater than 0 if string1 &gt; string2.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">5<\/td>\n<td><b>strchr(string1, ch);<\/b><\/p>\n<p>Returns a pointer to the first occurrence of character ch in string string1.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">6<\/td>\n<td><b>strstr(s1, s2)<\/b><\/p>\n<p>Returns a pointer to the first occurrence of string string2 in string string1.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The functions above derives from C. Therefore to use them, you need to include &lt;cstring&gt; header in your program.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. String Manipulation With C++ String Class<\/strong><\/h4>\n<p>Let&#8217;s now see how to do the same thing using C++ string class<\/p>\n<ul>\n<li><strong>Concatenation<\/strong> &#8211; Combines two string into one. Simply use the <em><strong>+ operator<\/strong><\/em>. See example below<\/li>\n<li><strong>String length<\/strong> &#8211; Use<em><strong> length()<\/strong><\/em> method<\/li>\n<li><strong>Searching strings<\/strong> &#8211; Accessing a character within a string. Use the <strong>find()<\/strong> method<\/li>\n<li><strong>Substrings<\/strong> &#8211; Returning part of a string. Use the <strong><em>substr()<\/em><\/strong> method.<\/li>\n<li><strong>Replacing<\/strong> &#8211; Replacing part of a string. Use the<strong><em> replace()<\/em><\/strong> method<\/li>\n<li><strong>Insertion<\/strong> &#8211; Inserting character(s) into a string. Using the<em><strong> insert()<\/strong><\/em> method<\/li>\n<li><strong>Erase<\/strong> &#8211; Removing part of a string. Use the<strong><em> erase()<\/em><\/strong> method.<\/li>\n<\/ul>\n<p>The program below shows how these methods can be applied.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/ String manipulation using methods<\/span>\r\n<span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span> () {\r\n\t   string string1 <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Beginner \"<\/span>;\r\n\t   string string2 <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"to Expert \"<\/span>;\r\n\t   string string3 <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Tutorials\"<\/span>;\r\n\t   string string4 <span style=\"color: #333333;\">=<\/span> string1 <span style=\"color: #333333;\">+<\/span> string2 <span style=\"color: #333333;\">+<\/span> string3;\r\n\t   <span style=\"color: #333399; font-weight: bold;\">int<\/span>  len <span style=\"color: #333333;\">=<\/span> string4.length();\r\n\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> string4 <span style=\"color: #333333;\">&lt;&lt;<\/span> endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Length of string1 is: \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> len <span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span><span style=\"background-color: #fff0f0;\">\"Expert is at position \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> string2.find(<span style=\"background-color: #fff0f0;\">\"Expert\"<\/span>) <span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Part of string 2: \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> string2.substr(<span style=\"color: #0000dd; font-weight: bold;\">3<\/span>,<span style=\"color: #0000dd; font-weight: bold;\">8<\/span>)<span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Replacing 'Expert':  \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> string4.replace(<span style=\"color: #0000dd; font-weight: bold;\">12<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">17<\/span>, <span style=\"background-color: #fff0f0;\">\"Guru\"<\/span>)<span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Insertion:  \"<\/span><span style=\"color: #333333;\">&lt;&lt;<\/span> string4.insert(<span style=\"color: #0000dd; font-weight: bold;\">0<\/span>, <span style=\"background-color: #fff0f0;\">\" by Kindson\"<\/span>)<span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   cout <span style=\"color: #333333;\">&lt;&lt;<\/span> <span style=\"background-color: #fff0f0;\">\"Erasing:  \"<\/span> <span style=\"color: #333333;\">&lt;&lt;<\/span> string3.erase(<span style=\"color: #0000dd; font-weight: bold;\">0<\/span>,<span style=\"color: #0000dd; font-weight: bold;\">3<\/span>)<span style=\"color: #333333;\">&lt;&lt;<\/span>endl;\r\n\r\n\t   <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>;\r\n}\r\n<\/pre>\n<p>If you successfully run the program, you will have the output:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">Beginner to Expert Tutorials\r\nLength of string1 is: 28\r\nExpert is at position3\r\nPart of string 2: Expert \r\nReplacing 'Expert':  Beginner to Guru\r\nInsertion:   by KindsonBeginner to Guru\r\nErasing:  orials\r\n<\/pre>\n<p>I would recommend you take some time to understand how it works to produce the outputs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, you will learn about string manipulation in C++. We&#8217;ll cover all the various operations that you can do with strings. C-Type Strings &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-c-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C++ String Manipulation - C++ Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ String Manipulation - C++ Tutorials\" \/>\n<meta property=\"og:description\" content=\"In this lesson, you will learn about string manipulation in C++. We&#8217;ll cover all the various operations that you can do with strings. C-Type Strings &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/\" \/>\n<meta property=\"og:site_name\" content=\"C++ Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-31T08:13:26+00:00\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. 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:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\"},\"headline\":\"C++ String Manipulation\",\"datePublished\":\"2020-08-31T08:13:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/\"},\"wordCount\":462,\"commentCount\":0,\"articleSection\":[\"C++ Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/\",\"name\":\"C++ String Manipulation - C++ Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#website\"},\"datePublished\":\"2020-08-31T08:13:26+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/c-string-manipulation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ String Manipulation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#website\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/\",\"name\":\"C++ Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/#\\\/schema\\\/person\\\/59a11a9f72bb132f56f91ab9f8a58a0e\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/cplusplus\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ String Manipulation - C++ Tutorials","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:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/","og_locale":"en_US","og_type":"article","og_title":"C++ String Manipulation - C++ Tutorials","og_description":"In this lesson, you will learn about string manipulation in C++. We&#8217;ll cover all the various operations that you can do with strings. C-Type Strings &hellip;","og_url":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/","og_site_name":"C++ Tutorials","article_published_time":"2020-08-31T08:13:26+00:00","author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/#article","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e"},"headline":"C++ String Manipulation","datePublished":"2020-08-31T08:13:26+00:00","mainEntityOfPage":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/"},"wordCount":462,"commentCount":0,"articleSection":["C++ Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/","url":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/","name":"C++ String Manipulation - C++ Tutorials","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#website"},"datePublished":"2020-08-31T08:13:26+00:00","author":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e"},"breadcrumb":{"@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/c-string-manipulation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kindsonthegenius.com\/cplusplus\/"},{"@type":"ListItem","position":2,"name":"C++ String Manipulation"}]},{"@type":"WebSite","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#website","url":"https:\/\/kindsonthegenius.com\/cplusplus\/","name":"C++ Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kindsonthegenius.com\/cplusplus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kindsonthegenius.com\/cplusplus\/#\/schema\/person\/59a11a9f72bb132f56f91ab9f8a58a0e","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/kindsonthegenius.com\/cplusplus\/author\/kindsonthegenius-3\/"}]}},"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":1,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":210,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/209\/revisions\/210"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}