Returns a slice [begin .. end]. I
size_t end
- ) pure nothrow @nogc scope @system;
+ ) pure nothrow @nogc @system;
diff --git a/docs/basic_string/BasicString.ptr.html b/docs/basic_string/BasicString.ptr.html
index 5a8d636..d1337ca 100644
--- a/docs/basic_string/BasicString.ptr.html
+++ b/docs/basic_string/BasicString.ptr.html
@@ -33,7 +33,7 @@
-
Function BasicString.destroy
Erases and deallocate the contents of the BasicString
, which becomes an empty string (with a length of 0 characters).
+
Function BasicString.release
Erases and deallocate the contents of the BasicString
, which becomes an empty string (with a length of 0 characters).
- void destroy() scope;
+ void release() scope;
@@ -49,7 +49,7 @@
Function BasicString.destroy
Erases and deallocate the contents of th
str.clear();
assert(str.capacity == cap);
-str.destroy();
+str.release();
assert(str.capacity < cap);
assert(str.capacity == BasicString!char.MinimalCapacity);
diff --git a/docs/file_hashes.json b/docs/file_hashes.json
index 8bded14..59c7dc2 100644
--- a/docs/file_hashes.json
+++ b/docs/file_hashes.json
@@ -1 +1 @@
-{"basic_string/BasicString.length.html":"84423A4F122585648EEB1942B4A42742","basic_string/BasicString.put.html":"ED1828471F17310CC30B8D1B3F58CF8E","basic_string/BasicString.frontCodeUnit.html":"B305F8B56B6E865B21528FF09E91E76F","basic_string/BasicString.build.html":"4F23E18CBF51456A61D660E35091A036","basic_string/BasicString.backCodeUnit.html":"D1E98F23E559737BDC6F5F29780201BF","basic_string/BasicString.backCodePoint.html":"961B0CBBA2F39DBDA7A339F72097E8B2","basic_string/BasicString.this.html":"97D6600F449FBEE855347C5330A7FD5B","basic_string/BasicString.empty.html":"2158D067B3E430AA8FDC05D352C9627F","basic_string/BasicString.Char.html":"FBED44E06E13072C75494C08C2A5314D","basic_string/BasicString.opCmp.html":"A1BFB9FA140E9A9772E317D4C90C1E27","basic_string/BasicString.opBinary.html":"9A157B415C9010C850F8DD8E46FE1606","basic_string/BasicString.capacity.html":"57B771BF5459EF2BBBF3273848D78370","basic_string/BasicString.destroy.html":"990FD5F5CC1782B95D13E29E3D2D4090","basic_string/BasicString.MaximalCapacity.html":"037DE9349A23011E74AC4479182B6CC5","basic_string/BasicString.ptr.html":"56450B028F61D546A8828667008FD73F","basic_string/BasicString.html":"29125743A6D067B9ABF643060BB798EA","basic_string/BasicString.popBackCodeUnit.html":"C4C2115A16C1D53DE02DE69BF6F98CE4","basic_string/BasicString.proxySwap.html":"16ED7AAB1C3FDAAD34762DA3B81C4B02","basic_string/BasicString.shrinkToFit.html":"D75FF51DA34B531569D78CED642A52A0","basic_string/BasicString.opEquals.html":"5BD18144C7148B0B6A30A312BDCFE3B8","basic_string/BasicString.opSlice.html":"0681A8FBE8546ED718A845BA066E57AE","basic_string/BasicString.popBack.html":"159196CDAADA668EC68C7B88A8DBDCC3","basic_string/BasicString.clear.html":"451611D5A9CB84EAF65427E94CEC2C1C","basic_string/BasicString.opBinaryRight.html":"391C0C131D66369DEB181D7DAF5109B4","basic_string/BasicString.allocator.html":"1F03545190ED49F7B848621E9F6682C5","basic_string/BasicString.toHash.html":"88DFB1CABE7C6288E83D859E8C075622","basic_string/BasicString.opAssign.html":"AF3BD7AEC2BA725A8E96684AB6DB5605","sitemap.xml":"124060EF8EFB43CFCF78F0EA9AAAE6B5","index.html":"93A86874C783CDACC48099B29837106C","basic_string/BasicString.opDollar.html":"218E8DC529D4A2B64117B1FE2A1B6EFE","basic_string/BasicString.valid.html":"76D7AB8134780D06938421E4CA6E07CA","symbols.js":"FC7A229A6E5F8587B5A54E25673FE4E4","basic_string/BasicString.append.html":"B43E326F47BC06450801DFB46B77CD53","basic_string/BasicString.frontCodePoint.html":"A4135BE8D5231AF387A41AF4C5BDF904","basic_string/BasicString.opIndex.html":"A66C3CC336D781CC3B731B7E468216B4","basic_string/BasicString.erase.html":"E4D08FA85DC33C06794A86E07C36596F","basic_string.html":"29FBD9E7B3263C347B319AA7C2A8A8BE","basic_string/BasicString.front.html":"09659074D0648D619C2B7710E42E7976","basic_string/BasicString.popBackCodePoint.html":"C07E92E43B4F2181CB406F20F9D0552D","basic_string/BasicString.Allocator.html":"DDA39D8E8026647922FF90A4BEFF43BC","basic_string/BasicString.insert.html":"25A326312B381EADB5EB0FCC7B68BADA","basic_string/BasicString.back.html":"538086E18B5C314A930C701E9DF6215E","basic_string/BasicString.replace.html":"EBC45355CE8ED859E3F01ABA54EEC764","basic_string/BasicString.hasStatelessAllocator.html":"A83E3A8A9D16751F82A56D5B86AE0866","basic_string/BasicString.opIndexAssign.html":"59F196550DCEA415DFE02011E9860678","basic_string/BasicString.MinimalCapacity.html":"A391D23D813E0FCE6AC2D01A195F5D27","basic_string/BasicString.reserve.html":"B781DCE8BF789D68FFA59AF167CEB292","basic_string/BasicString.resize.html":"CF25CA1364C6ED6752DDD9513C39C6E6","basic_string/BasicString.opOpAssign.html":"0C5851E031BBAA136BC43A9C01B02D58","basic_string/BasicString.small.html":"9FF98601BD83F43048AF3156774A2BBB","basic_string/isBasicString.html":"B2BE0C1D8EBA6EFF12656A40DE8CB414"}
\ No newline at end of file
+{"basic_string/BasicString.length.html":"84423A4F122585648EEB1942B4A42742","basic_string/BasicString.put.html":"ED1828471F17310CC30B8D1B3F58CF8E","basic_string/BasicString.frontCodeUnit.html":"B305F8B56B6E865B21528FF09E91E76F","basic_string/BasicString.build.html":"4F23E18CBF51456A61D660E35091A036","basic_string/BasicString.backCodeUnit.html":"D1E98F23E559737BDC6F5F29780201BF","basic_string/BasicString.backCodePoint.html":"961B0CBBA2F39DBDA7A339F72097E8B2","basic_string/BasicString.this.html":"97D6600F449FBEE855347C5330A7FD5B","basic_string/BasicString.empty.html":"2158D067B3E430AA8FDC05D352C9627F","basic_string/BasicString.Char.html":"FBED44E06E13072C75494C08C2A5314D","basic_string/BasicString.opCmp.html":"A1BFB9FA140E9A9772E317D4C90C1E27","basic_string/BasicString.opBinary.html":"9A157B415C9010C850F8DD8E46FE1606","basic_string/BasicString.capacity.html":"57B771BF5459EF2BBBF3273848D78370","basic_string/BasicString.ptr.html":"795046A7AF186783A906F5E2002291E1","basic_string/BasicString.MaximalCapacity.html":"037DE9349A23011E74AC4479182B6CC5","basic_string/BasicString.html":"DA9AD665DB8FB0583A0E0434C3A5A7DF","basic_string/BasicString.shrinkToFit.html":"D75FF51DA34B531569D78CED642A52A0","basic_string/BasicString.popBackCodeUnit.html":"C4C2115A16C1D53DE02DE69BF6F98CE4","basic_string/BasicString.proxySwap.html":"16ED7AAB1C3FDAAD34762DA3B81C4B02","basic_string/BasicString.opEquals.html":"5BD18144C7148B0B6A30A312BDCFE3B8","basic_string/BasicString.opSlice.html":"413F2747767EC1145B787C1ED4340494","basic_string/BasicString.popBack.html":"159196CDAADA668EC68C7B88A8DBDCC3","basic_string/BasicString.clear.html":"451611D5A9CB84EAF65427E94CEC2C1C","basic_string/BasicString.opBinaryRight.html":"391C0C131D66369DEB181D7DAF5109B4","basic_string/BasicString.allocator.html":"1F03545190ED49F7B848621E9F6682C5","basic_string/BasicString.toHash.html":"88DFB1CABE7C6288E83D859E8C075622","basic_string/BasicString.opAssign.html":"AF3BD7AEC2BA725A8E96684AB6DB5605","sitemap.xml":"D6B88B0B0B4430287BAFD20E2BA5AA3F","index.html":"93A86874C783CDACC48099B29837106C","basic_string/BasicString.opDollar.html":"218E8DC529D4A2B64117B1FE2A1B6EFE","basic_string/BasicString.valid.html":"76D7AB8134780D06938421E4CA6E07CA","symbols.js":"B766EB89214B05F1063D0859542ED07E","basic_string/BasicString.append.html":"B43E326F47BC06450801DFB46B77CD53","basic_string/BasicString.frontCodePoint.html":"A4135BE8D5231AF387A41AF4C5BDF904","basic_string/BasicString.opIndex.html":"A66C3CC336D781CC3B731B7E468216B4","basic_string/BasicString.erase.html":"E7F0B2F6ACC07AB23C87C1E64F81338E","basic_string.html":"29FBD9E7B3263C347B319AA7C2A8A8BE","basic_string/BasicString.front.html":"09659074D0648D619C2B7710E42E7976","basic_string/BasicString.popBackCodePoint.html":"C07E92E43B4F2181CB406F20F9D0552D","basic_string/BasicString.Allocator.html":"DDA39D8E8026647922FF90A4BEFF43BC","basic_string/BasicString.insert.html":"25A326312B381EADB5EB0FCC7B68BADA","basic_string/BasicString.back.html":"538086E18B5C314A930C701E9DF6215E","basic_string/BasicString.replace.html":"EBC45355CE8ED859E3F01ABA54EEC764","basic_string/BasicString.hasStatelessAllocator.html":"A83E3A8A9D16751F82A56D5B86AE0866","basic_string/BasicString.opIndexAssign.html":"59F196550DCEA415DFE02011E9860678","basic_string/BasicString.MinimalCapacity.html":"A391D23D813E0FCE6AC2D01A195F5D27","basic_string/BasicString.reserve.html":"B781DCE8BF789D68FFA59AF167CEB292","basic_string/BasicString.resize.html":"CF25CA1364C6ED6752DDD9513C39C6E6","basic_string/BasicString.release.html":"A5B21687EC430C3599211CF9AF42E878","basic_string/BasicString.opOpAssign.html":"0C5851E031BBAA136BC43A9C01B02D58","basic_string/BasicString.small.html":"9FF98601BD83F43048AF3156774A2BBB","basic_string/isBasicString.html":"B2BE0C1D8EBA6EFF12656A40DE8CB414"}
\ No newline at end of file
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 74150f8..e2c82ed 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -16,7 +16,6 @@
http://127.0.0.1/basic_string/BasicString.capacity.html
http://127.0.0.1/basic_string/BasicString.Char.html
http://127.0.0.1/basic_string/BasicString.clear.html
-http://127.0.0.1/basic_string/BasicString.destroy.html
http://127.0.0.1/basic_string/BasicString.empty.html
http://127.0.0.1/basic_string/BasicString.erase.html
http://127.0.0.1/basic_string/BasicString.erase.html
@@ -58,6 +57,7 @@
http://127.0.0.1/basic_string/BasicString.proxySwap.html
http://127.0.0.1/basic_string/BasicString.ptr.html
http://127.0.0.1/basic_string/BasicString.put.html
+http://127.0.0.1/basic_string/BasicString.release.html
http://127.0.0.1/basic_string/BasicString.replace.html
http://127.0.0.1/basic_string/BasicString.replace.html
http://127.0.0.1/basic_string/BasicString.replace.html
diff --git a/docs/symbols.js b/docs/symbols.js
index 761e583..5713dff 100644
--- a/docs/symbols.js
+++ b/docs/symbols.js
@@ -12,7 +12,6 @@ var symbols = [
{name: 'basic_string.BasicString.capacity', kind: "functiondeclaration", path: './basic_string/BasicString.capacity.html', attributes: ["const", "pure", "nothrow", "nogc", "property", "scope", "trusted"]},
{name: 'basic_string.BasicString.Char', kind: "aliasdeclaration", path: './basic_string/BasicString.Char.html', attributes: []},
{name: 'basic_string.BasicString.clear', kind: "functiondeclaration", path: './basic_string/BasicString.clear.html', attributes: ["pure", "nothrow", "nogc", "scope", "trusted"]},
-{name: 'basic_string.BasicString.destroy', kind: "functiondeclaration", path: './basic_string/BasicString.destroy.html', attributes: ["scope"]},
{name: 'basic_string.BasicString.empty', kind: "functiondeclaration", path: './basic_string/BasicString.empty.html', attributes: ["const", "pure", "nothrow", "nogc", "property", "scope", "safe"]},
{name: 'basic_string.BasicString.erase', kind: "functiondeclaration", path: './basic_string/BasicString.erase.html', attributes: ["pure", "nothrow", "nogc", "scope", "trusted"]},
{name: 'basic_string.BasicString.front', kind: "aliasdeclaration", path: './basic_string/BasicString.front.html', attributes: []},
@@ -37,8 +36,9 @@ var symbols = [
{name: 'basic_string.BasicString.popBackCodePoint', kind: "functiondeclaration", path: './basic_string/BasicString.popBackCodePoint.html', attributes: ["pure", "nothrow", "nogc", "scope", "trusted"]},
{name: 'basic_string.BasicString.popBackCodeUnit', kind: "functiondeclaration", path: './basic_string/BasicString.popBackCodeUnit.html', attributes: ["pure", "nothrow", "nogc", "scope", "trusted"]},
{name: 'basic_string.BasicString.proxySwap', kind: "functiondeclaration", path: './basic_string/BasicString.proxySwap.html', attributes: ["pure", "nothrow", "nogc", "scope", "trusted"]},
-{name: 'basic_string.BasicString.ptr', kind: "functiondeclaration", path: './basic_string/BasicString.ptr.html', attributes: ["inout", "pure", "nothrow", "nogc", "property", "scope", "system"]},
+{name: 'basic_string.BasicString.ptr', kind: "functiondeclaration", path: './basic_string/BasicString.ptr.html', attributes: ["inout", "pure", "nothrow", "nogc", "property", "system"]},
{name: 'basic_string.BasicString.put', kind: "aliasdeclaration", path: './basic_string/BasicString.put.html', attributes: []},
+{name: 'basic_string.BasicString.release', kind: "functiondeclaration", path: './basic_string/BasicString.release.html', attributes: ["scope"]},
{name: 'basic_string.BasicString.replace', kind: "functiondeclaration", path: './basic_string/BasicString.replace.html', attributes: ["ref", "scope"]},
{name: 'basic_string.BasicString.reserve', kind: "functiondeclaration", path: './basic_string/BasicString.reserve.html', attributes: ["scope"]},
{name: 'basic_string.BasicString.resize', kind: "functiondeclaration", path: './basic_string/BasicString.resize.html', attributes: ["scope"]},
diff --git a/src/basic_string/internal/unittesting.d b/src/basic_string/internal/unittesting.d
index 07b3fd2..c167bbd 100644
--- a/src/basic_string/internal/unittesting.d
+++ b/src/basic_string/internal/unittesting.d
@@ -960,3 +960,4 @@ nothrow unittest{
}
}
+
diff --git a/src/basic_string/package.d b/src/basic_string/package.d
index 9a5e696..8c0cc4e 100644
--- a/src/basic_string/package.d
+++ b/src/basic_string/package.d
@@ -831,12 +831,12 @@ if(isSomeChar!_Char && is(Unqual!_Char == _Char)){
str.clear();
assert(str.capacity == cap);
- str.destroy();
+ str.release();
assert(str.capacity < cap);
assert(str.capacity == BasicString!char.MinimalCapacity);
--------------------
*/
- public void destroy()scope{
+ public void release()scope{
if(this._sso){
this._short.length = 0;
}
@@ -848,6 +848,11 @@ if(isSomeChar!_Char && is(Unqual!_Char == _Char)){
}
}
+ deprecated("use `.release()` instead")
+ public void destroy()scope{
+ this.release();
+ }
+
/**
@@ -1370,7 +1375,7 @@ if(isSomeChar!_Char && is(Unqual!_Char == _Char)){
}
private ref typeof(this) _op_assign(return scope typeof(this) str)return scope{
- this.destroy();
+ this.release();
moveEmplaceImpl(str, this);
return this;
}
@@ -2060,7 +2065,7 @@ if(isSomeChar!_Char && is(Unqual!_Char == _Char)){
BasicString!char str = "123456";
str.erase(2);
- assert(str == "12456");
+ assert(str == "12");
--------------------
--------------------