Skip to main content

Working with Strings

  • Chapter
  • First Online:
Beginning C++17
  • 4849 Accesses

Abstract

This chapter is about handling textual data much more effectively and safely than the mechanism provided by a C-style string stored in an array of char elements.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Unless proverb itself is of type const std::string; if that’s the case, data() results in a const char* pointer as well. Refer to Chapter 11 for more details on the relation between const objects and member functions.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Ivor Horton and Peter Van Weert

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Horton, I., Van Weert, P. (2018). Working with Strings. In: Beginning C++17. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3366-5_7

Download citation

Publish with us

Policies and ethics