From ae26351a0eac04bc6ea249a02607ff9eb8b97d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Wed, 31 Oct 2018 14:29:40 +0100 Subject: [PATCH] changelog entry (cherry picked from commit 80843373ba2e944b4b3b76d01264cbdfe70588ef) --- changelog.md | 2 ++ lib/pure/strutils.nim | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2702048daf..8359fbef14 100644 --- a/changelog.md +++ b/changelog.md @@ -147,6 +147,8 @@ - The ``accept`` socket procedure defined in the ``net`` module can now accept a nil socket. +- In `strutils` empty strings now no longer matched as substrings anymore. + ### Language additions - Vm suport for float32<->int32 and float64<->int64 casts was added. diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 82217b4fed..cc55301752 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -2581,7 +2581,7 @@ when isMainModule: doAssert "-lda-ldz -ld abc".replaceWord("-ld") == "-lda-ldz abc" doAssert "-lda-ldz -ld abc".replaceWord("") == "-lda-ldz -ld abc" - doAssert "oo".replace("", "abc") == "abcoabcoabc" + doAssert "oo".replace("", "abc") == "oo" type MyEnum = enum enA, enB, enC, enuD, enE doAssert parseEnum[MyEnum]("enu_D") == enuD