{"id":1935,"date":"2022-09-12T20:21:50","date_gmt":"2022-09-12T20:21:50","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=1935"},"modified":"2022-09-12T20:21:52","modified_gmt":"2022-09-12T20:21:52","slug":"java-string-striptrailing","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/java-string-striptrailing\/","title":{"rendered":"Java String stripTrailing() method"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>StripTrailing Method<\/strong><\/p>\n\n\n<p>With this method, we can cut the trailing whitespaces (the whitespaces at the end) from the string. Have a look at the below program and try to implement it and observe the results.<\/p>\n\n\n\n<p class=\"has-background-color has-foreground-background-color has-text-color has-background\">public class StringMethods {<br>public static void main(String[] args) {<br>String spaces = &#8221; Java &#8220;;<br>System.out.println(spaces.stripTrailing());<br>}<br>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>StripTrailing Method With this method, we can cut the trailing whitespaces (the whitespaces at the end) from the string. Have a look at the below program and try to implement it and observe the results. public class StringMethods {public static void main(String[] args) {String spaces = &#8221; Java &#8220;;System.out.println(spaces.stripTrailing());}}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[12,11],"class_list":{"0":"post-1935","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-java-tutorial","7":"tag-java","8":"tag-java-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=1935"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1935\/revisions"}],"predecessor-version":[{"id":3016,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1935\/revisions\/3016"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=1935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=1935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=1935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}