⊗ppPmSFTr 154 of 447 menu

Trimming Line Ends in PHP

trim ltrim rtrim

Given a string. Clear it of trailing spaces.

Given a string '/php/'. Make it a string 'php' by removing the trailing slashes.

Given a string 'text text text.'. There may be a period at the end of this string, or there may not be. Make sure that there is a period at the end of this string. That is: if there is no period - it must be added, and if there is - do nothing. Solve the problem via rtrim without any ifs.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline