Java Custom Exception In Java, we can create our own exceptions that are derived classes of the Exception class. Creating our own…
exception
-
-
C++ String capacity() This function gives the current size of the allocated space for the string. Capacity of the string is not…
-
C++ String find_last_of() This function searches the string for the last character that matches any of the character specified in the string.…
-
C++ String shrink_to_fit() This function reduces the capacity of the string and makes it equal to its size. Syntax Consider a string…
-
C++ String cbegin() It gives a reference to the first element of the string. Difference b/w cbegin() and begin() The only difference…
-
C++ String cend() This function gives a reference to the last character of the string. Difference b/w end() and cend() The only…
-
C++ String swap() This function is used to exchange the values of two string objects. Syntax Consider two strings s1 and s2…
-
C++ String max_size() This function returns the maximum length the string can reach due to known system. Syntax Consider a string str.…
-
C++ String operator[]() This function is used to get a character at position pos in the string. Syntax Consider a string ‘str’…
-
C++ String crbegin() The crbegin() function stands for ‘reverse beginning’. This function references to the last character of the string. Syntax Consider…