Top "Standard-library" questions

The standard library contains core utilities provided by all implementations of the language.

Read whole ASCII file into C++ std::string

I need to read a whole file into memory and place it in a C++ std::string. If I were …

c++ string caching file-io standard-library
How to check if a file exists in Go?

Go's standard library does not have a function solely intended to check if a file exists or not (like Python's …

file go standard-library
"Unresolved inclusion" error with Eclipse CDT for C standard library headers

I set up CDT for eclipse and wrote a simple hello world C program: #include <stdio.h> int …

c eclipse eclipse-cdt standard-library
Concatenating strings doesn't work as expected

I know it is a common issue, but looking for references and other material I don't find a clear answer …

c++ operator-keyword string-concatenation stdstring standard-library
Removing duplicate elements from an array in Swift

I might have an array that looks like the following: [1, 4, 2, 2, 6, 24, 15, 2, 60, 15, 6]

arrays swift standard-library
Case Insensitive String comp in C

I have two postcodes char* that I want to compare, ignoring case. Is there a function to do this? Or …

c string standard-library
Why is it OK to return a 'vector' from a function?

Please consider this code. I have seen this type of code several times. words is a local vector. How is …

c++ vector stl scope standard-library
Getting a machine's external IP address with Python

Looking for a better way to get a machines current external IP #... Below works, but would rather not rely on …

python standard-library
What is std::promise?

I'm fairly familiar with C++11's std::thread, std::async and std::future components (e.g. see this answer), which …

c++ multithreading c++11 promise standard-library
Is there a standard java exception class that means "The object was not found"?

Consider a function of the following general form: Foo findFoo(Collection<Foo> foos, otherarguments) throws ObjectNotFoundException { for(Foo …

java exception standard-library