Study the ways to implement trim operations of std::string

Print Friendly, PDF & Email

Introduction

The C++ Standard Template Library (STL, for short) contains the useful std::string class, which provides a lot of common string operations. However, the well-known trim operation was not implemented. The trim operation performs removals of all unused spaces placed before and after the characters into a string.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.