Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
- Java
- Java
- Java
- Java
- Ada
- Clojure
- C++
- C#
- Dart
- Fortran
- Go
- Go
- Haskell
- Haskell
- JS
- PHP
- Pascal
- Perl
- Python
- Ruby
- Rust
int n, t[] = new int[n = items.length - 1];
arraycopy(items, 0, t, 0, n);
items = t;
items.removeLast();
(drop-last items)
items.pop_back();
Removes last element from items, without returning anything.
If items is already empty, then behaviour is undefined.
If items is already empty, then behaviour is undefined.
items.RemoveAt(items.Count - 1);
items = items(1:size(items)-1)
items = items[:len(items)-1]
If items is already empty, this will panic with "slice bounds out of range".
Warning: the last element still exists beyond len(items), thus it won't be garbage collected.
Warning: the last element still exists beyond len(items), thus it won't be garbage collected.
items.pop()
items.pop
items.pop(2) would remove (and return) the last 2.