Understanding the String.split Method in Java

The split method in Java is commonly used to divide strings based on a delimiter. The single-parameter version: public String[] split(String regex) { return split(regex, 0); } invokes an overloaded method with a default limit of 0. The underlying implementation: public String[] split(String regex, int limit) { String[] fast = Pattern.f ...

Posted on Sat, 09 May 2026 00:42:34 +0000 by ketola

Building a Custom String Class in C++

A custom string class typically wraps a dynamically alocated character array along with size and capacity tracking. The following implementation lives inside a dedicated namespace to avoid collisions with the standard library. namespace custom { class string { private: char* _data; size_t _len; size_t _cap; ...

Posted on Fri, 08 May 2026 01:30:05 +0000 by BRUUUCE