Skip to content

Latest commit

 

History

History
82 lines (72 loc) · 1.16 KB

File metadata and controls

82 lines (72 loc) · 1.16 KB

StringClass

Writing the string class from scratch as an exercise

THINK ABOUT:

add releases:

  • first release will be standard version of string
  • secound release will be improved("add boost :)")

To implement

Element access ( tested ):

  • at
  • operator[]
  • front
  • back
  • data
  • c_str

Iterators ( tested )

  • begin / cbegin
  • end / cend
  • rbegin / crbegin
  • rend / crend

Capacity ( tested )

  • empty
  • m_size / length
  • max_size
  • reserve
  • capacity
  • shrink_to_fit

Operations

  • clear
  • insert
  • erase
  • push_back
  • pop_back
  • append
  • operator+=
  • compare
  • starts_with
  • ends_with
  • contains
  • replace
  • substr
  • copy
  • resize
  • resize_and_overwrite
  • swap

Search

  • find
  • rfind
  • find_first_of
  • find_first_not_of
  • find_last_of
  • find_last_not_of

Constans

  • npos[static]

Non-member functions

  • operator+
  • operator==
  • operator!=
  • operator<
  • operator>
  • operator<=
  • operator>=
  • operator<=>
  • std::swap(std::String)
  • erase(std::String)
  • erase_if(std::String)

Input/Output

  • operator<<
  • operator>>
  • getline

Numeric conversions

  • to_string
  • to_wstring