Spend time to work on String class API on C#, C++, JavaScript, Java language. Always keep busy, study APIs first, go over all APIs.
1. C# programming language:
First, work on C# StringBuilder class:
https://msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=vs.110).aspx
2. C++ string class study (30 minutes a time)
Review and go through each one (30 minutes study ......)
http://www.cplusplus.com/reference/string/string/
member type (12):
value_type char
traits_type char_traits<char>
allocator_type allocator<char>
reference char&
const_reference const char&
pointer char*
iterator a random access iterator to char (convertible to const_iterator)
const_iterator a random access iterator to const char
reverse_iterator reverse_iterator<iterator>
const_reverse_iterator reverse_iterator<const_iterator>
different_type ptrdiff_t
size_type size_t
questions: traits_type ?
Iterators (8):
begin
end
(C++ 11)
rbegin
rend
cbegin
cend
crbegin
crend
Capacity (9):
size
length
max_size
resize
capacity
reserve
clear
empty
shrink_to_fit (C++ 11)
Element access (3)
operator[]
at
back - access last character
front - access first character
Modifiers (9):
operator+=
append
push_back
assign
insert
erase
replace
swap
pop_back
String operations (12):
c_str
data
get_allocation
copy
find
rfind
find_first_of
find_last_of
find_first_not_of
find_last_not_of
substr
compare
Member constants
npos - maximm value for size_t
Non-member function overloads (6)
operator+
relational operators
swap
operator>>
operator<<
getline
3. JavaScript String reference (30 minutes a time to study)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
Properties:
string.prototype
string.length
Methods:
Exclude deprecated methods, try to remember all the following methods: 34 methods
String.fromCharCode()
String.fromCodePoint()
String.prototype.anchor()
String.prototype.charAt()
String.prototype.codePointAt()
String.prototype.concat()
String.prototype.endsWith()
String.prototype.includes()
String.prototype.indexOf()
String.prototype.lastIndexOf()
String.prototype.link()
String.prototype.localeCompare()
String.prototype.match()
String.prototype.normalize()
String.prototype.repeat()
String.prototype.replace()
String.prototype.search()
String.prototype.slice()
String.prototype.split()
String.prototype.startsWith()
String.prototype.normalize()
String.prototype.substr()
String.prototype.substring()
String.prototype.toLocaleLowerCase()
String.prototype.toLocaleUpperCase()
String.prototype.toLowerCase()
String.prototype.toString()
String.prototype.toUpperCase()
String.prototype.trim()
String.prototype.trimLeft()
String.prototype.trimRight()
String.prototype.valueOf()
String.prototype[@@iterator]()
String.raw()
July 7, 2016 - Reading time: more than 30 minutes
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
substring
data descriptor/ accessor descriptor
In order to understand string - JavaScript, go through a lot of topics:
10 minutes reading of define property
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
string literal
global object directly
Template literals
back-tick (` `)
Expresssion interpolation
syntactic sugar making substitutions like this more readable
tagged template literal - more advanced form of template literals
Another 10 - 15 minutes reading of template literals
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
July 12, 2016
Java String class
https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#length()
No comments:
Post a Comment