ladybird/AK
Sergey Bugaev 499612482b AK: Fix String[View]::split_view() returning an extra empty part
If the last character was the separator and keep_empty is true, the
previous if statement would have already appended the last empty part,
so no need to do this again.

This was even more problematic, because the result of split_view() is
expected to consist of true substrings that are usable with the
StringView::substring_view_starting_*_substring() methods, not of
equal strings located elsewhere.

Fixes https://github.com/SerenityOS/serenity/issues/970
See https://github.com/SerenityOS/serenity/pull/938
2020-01-14 12:24:19 +01:00
..
Tests AK: Fix test compile warnings 2020-01-06 10:43:00 +01:00
Assertions.h AK: Remove unused AK::not_implemented() 2019-11-06 13:58:08 +01:00
Atomic.h AK: Run clang-format on Atomic.h 2020-01-12 18:45:13 +01:00
Badge.h AK: Delete the Badge copy and move constructors. 2019-06-11 23:47:51 -07:00
BinarySearch.h Shell: Cache PATH for faster tab completion 2019-12-05 17:09:22 +01:00
Bitmap.h AK: Make Bitmap constructors public to allow make<Bitmap>() 2019-10-01 19:58:07 +02:00
BufferStream.h AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
ByteBuffer.h ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
CircularDeque.h AK: Make it possible to store complex types in a CircularQueue 2019-10-23 12:27:43 +02:00
CircularQueue.h AK: Make it possible to store complex types in a CircularQueue 2019-10-23 12:27:43 +02:00
Demangle.h AK: Turn off demangler in userland 2020-01-01 17:48:41 +01:00
DoublyLinkedList.h AK: Add DoublyLinkedList::prepend() 2019-12-02 18:36:10 +01:00
Error.h Add Error<> 2019-07-31 09:06:39 +02:00
FileSystemPath.cpp AK: Add dirname() to FileSystemPath 2020-01-07 12:36:30 +01:00
FileSystemPath.h AK: Add dirname() to FileSystemPath 2020-01-07 12:36:30 +01:00
FixedArray.h AK: Add assertions to FixedArray::operator[] 2020-01-07 14:49:33 +01:00
Function.h Add clang-format file 2019-05-28 17:31:20 +02:00
HashFunctions.h AK: Add a u64 Trait type 2020-01-05 09:00:05 +01:00
HashMap.h AK: Add HashMap::find() with customizable finder callback 2019-08-25 06:45:27 +02:00
HashTable.h AK: Make HashTable.h compile inside the SDL2 port 2019-08-25 17:47:48 +02:00
IDAllocator.h LibCore: IDAllocator should never vend ID 0 2020-01-05 15:13:55 +01:00
InlineLinkedList.h AK: InlineLinkedListIterator operator-> should return m_node directly 2019-12-22 09:07:47 +01:00
InlineLRUCache.h AK: InlineLRUCache was always filling up one short of capacity. 2019-05-14 15:33:21 +02:00
IntrusiveList.h AK: Add IntrusiveList::take_first() 2019-12-22 12:38:01 +01:00
IPv4Address.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
IterationDecision.h AK: Add IterationDecision.h. 2019-06-07 17:14:16 +02:00
JsonArray.h AK: Add JsonArray::ensure_capacity() 2019-10-23 14:55:21 +02:00
JsonArraySerializer.h Json: Add serializer fast-path for string values 2019-09-04 14:40:11 +02:00
JsonObject.h AK: Add JsonObject::get_ptr() for copy-free lookup 2019-12-30 14:49:45 +01:00
JsonObjectSerializer.h Json: Add serializer fast-path for string values 2019-09-04 14:40:11 +02:00
JsonParser.cpp AK: Fix JSON parser crashing when encountering UTF-8 2019-12-29 22:20:21 +01:00
JsonParser.h AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
JsonValue.cpp AK: Allow JsonValue to store 64-bit integers internally 2019-10-29 16:36:50 +01:00
JsonValue.h JsonValue: Fix wrong return type of as_u32() and friends 2019-12-12 21:17:26 +01:00
kmalloc.h Kernel: Move kmalloc() into a Kernel/Heap/ directory 2019-09-16 09:01:44 +02:00
kstdio.h Kernel+LibC: Add a dbgputstr() syscall for sending strings to debug output. 2019-07-21 21:43:37 +02:00
LogStream.cpp Build: Get rid of the USERLAND define 2019-12-20 22:59:11 +01:00
LogStream.h Build: Get rid of the USERLAND define 2019-12-20 22:59:11 +01:00
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
MappedFile.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
MappedFile.h ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
NetworkOrdered.h AK: Use __builtin_bswap() in NetworkOrdered. 2019-06-26 20:01:48 +02:00
NeverDestroyed.h AK: Add NeverDestroyed<T>, for things that should never be destroyed 2019-12-26 22:12:45 +01:00
Noncopyable.h AK: Add AK_MAKE_NONMOVABLE 2019-09-22 00:17:29 +02:00
NonnullOwnPtr.h AK: Delete operator!() and operator bool() from the Nonnull pointers 2019-11-07 18:00:05 +01:00
NonnullOwnPtrVector.h AK: Simplify NonnullPtrVector template a bit. 2019-07-25 11:10:28 +02:00
NonnullPtrVector.h NonnullPtrVector: Add ptr_at() getters for accessing the NonnullPtr 2019-08-19 19:04:52 +02:00
NonnullRefPtr.h AK: Delete operator!() and operator bool() from the Nonnull pointers 2019-11-07 18:00:05 +01:00
NonnullRefPtrVector.h AK: Simplify NonnullPtrVector template a bit. 2019-07-25 11:10:28 +02:00
Optional.h AK: Optional::operator bool() should consume the Optional 2019-08-25 06:45:09 +02:00
OwnPtr.h AK: Use int_hash() to generate less idiotic hashes for {Nonnull,}OwnPtr 2019-08-14 21:21:15 +02:00
Platform.h AK: Shim open_with_path_length() for non-Serenity builds. 2019-07-25 14:25:45 +02:00
PrintfImplementation.h AK: Implement %n printf specifier 2019-12-05 12:29:11 +01:00
Queue.h AK: Allow overriding the Queue segment size with a template parameter 2019-11-03 12:33:51 +01:00
QuickSort.h LibGUI: Run clang-format on everything. 2019-06-07 11:46:02 +02:00
RefCounted.h AK: Rename Retainable.h => RefCounted.h. 2019-06-21 18:58:45 +02:00
RefPtr.h AK: Make it possible to use HashMap<K, NonnullOwnPtr>::get() 2019-08-14 11:47:38 +02:00
Result.h Add Result<>, to use with/complement Error 2019-07-31 09:06:39 +02:00
ScopedValueRollback.h AK: Add ScopedValueRollback::set_override_rollback_value(). 2019-07-25 15:21:16 +02:00
ScopeGuard.h AK: Add ArmedScopeGuard, a scope guard that can be disarmed 2020-01-13 13:03:30 +01:00
SharedBuffer.cpp AK: Move the userspace SharedBuffer from LibC to AK 2020-01-01 18:53:34 +01:00
SharedBuffer.h AK: Move the userspace SharedBuffer from LibC to AK 2020-01-01 18:53:34 +01:00
SinglyLinkedList.h AK: Fix unused parameter bug in SinglyLinkedList (#928) 2019-12-27 10:29:28 +01:00
StdLibExtras.h Kernel+AK: Remove AK/StdLibExtras.cpp, moving kernel stuff to Kernel/. 2019-07-29 11:58:44 +02:00
String.cpp AK: Fix String[View]::split_view() returning an extra empty part 2020-01-14 12:24:19 +01:00
String.h AK+Demos+Libraries: Remove executable permissions from {.cpp,.h} files 2020-01-06 10:43:00 +01:00
StringBuilder.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
StringBuilder.h AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
StringImpl.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
StringImpl.h AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
StringView.cpp AK: Fix String[View]::split_view() returning an extra empty part 2020-01-14 12:24:19 +01:00
StringView.h AK: Add StringView::ends_with function 2019-12-29 22:04:22 +01:00
TemporaryChange.h Add clang-format file 2019-05-28 17:31:20 +02:00
TestSuite.h AK: Get rid of TStyle (output styling helper for LogStream) 2019-11-06 11:37:03 +01:00
Time.h AK: Make timeval_add() and timeval_sub() take references. 2019-06-06 18:02:28 +02:00
Traits.h AK: Add a u64 Trait type 2020-01-05 09:00:05 +01:00
Types.h AK: Add a useful align_up_to(value, power_of_two) function 2019-09-07 15:39:26 +02:00
URL.cpp AK: Teach URL::complete_url() how to resolve URL's starting with "/" 2019-12-10 21:13:00 +01:00
URL.h AK: Add a query string component to URL 2019-11-25 21:21:27 +01:00
Utf8View.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
Utf8View.h UTF-8: Add Utf8CodepointIterator::codepoint_length_in_bytes() 2019-10-18 22:49:23 +02:00
Vector.h AK: Allow copying a Vector from a Vector with different inline capacity 2020-01-04 10:57:30 +01:00
Weakable.h AK: Rename Retainable.h => RefCounted.h. 2019-06-21 18:58:45 +02:00
WeakPtr.h AK: Fix leak in WeakPtr(WeakPtr&&) and WeakPtr::operator=(WeakPtr&&) 2019-11-15 16:07:39 +01:00