Code Monkey home page Code Monkey logo

mystring's Introduction

设计mystring类,要求实现以下功能:

1、http://www.cplusplus.com/reference/cstring/ 中右边后涉及的所有功能。(共24个)

2、实现以下功能。(共9个)。功能描述与使用见:

http://www.cplusplus.com/reference/string/

Stoi, stol, stoul, stoll, stoull, stof, stod, stold, to_string

3、Construct string object。(共6个)。功能描述与使用见:http://www.cplusplus.com/reference/string/string/string/

Constructs a string object, initializing its value depending on the constructor version used:

(1) empty string constructor (default constructor)
(2) copy constructor
(3) substring constructor
(4) from c-string
(5) from buffer
(6) fill constructor

4、实现以下功能。(共40个)功能描述与使用见:

http://www.cplusplus.com/reference/string/string/

(destructor), operator=, size, length

Capacity:
size, length, max_size, resize, capacity, reserve, clear, empty, shrink_to_fit

Element access:
operator[], at, back, front

Modifiers:
operator+=, append, push_back, assign, insert, erase, replace, swap, pop_back

String operations:
Data, copy, find, rfind, find_first_of, find_last_of, find_first_not_of, find_last_not_of, substr, compare

Non-member function overloads:
operator+, relational operators, swap, operator>>, operator<<, getline

5、测试 测试以上功能是否正确实现

mystring's People

Contributors

lyl1028 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.