Does JavaScript have a stl library?
Today, I would like to share with you the relevant knowledge of JavaScript has a stl library, the content is detailed, the logic is clear, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.
JavaScript does not have a stl library. The stl library is a standard template library and an efficient "C++" library with industrial strength, which is used to provide extension support such as the data structure of the basic language itself. The stl library is incorporated into the "C++" standard library, so there is no stl library in JavaScript.
The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.
Does JavaScript have a stl library?
JavaScript does not have a stl library
STL = Standard Template Library, the standard template library, the general term for a series of software developed by Hewlett-Packard Labs.
The positioning of C++ 's STL is to provide extension support such as the data structure of the basic language itself.
STL (Standard Template Library), the standard template library, is an industrial strength and efficient C++ library. It is contained in the C++ standard library (C++ Standard Library) and is the latest and revolutionary part of the ANSI/ISO C++ standard. The library contains many basic data structures and algorithms commonly used in the field of computer science. It provides an extensible application framework for C++ programmers, which highly reflects the reusability of the software.
Examples of stl library contents:
Vector vector (array of indefinite length)
1. Header file
# include / / header file
two。 Common command
Vectorvec; / / apply for a vector container, where int can also be other data types vec.push_back (num); / / insert a number numvec.size () into the container at the end; / / query the current container size, which is often used to traverse
3. Two-dimensional array
We can also apply for multiple vector at one time, so that we can act as a two-dimensional array.
Vectorvec [100]; / / apply for 100 containers with variable length
Map correlation container
Some of the previous content was sorted out from the STL in C++ of other blogs. The usage of map is explained in detail.
1. Header file
# include / / header file
two。 Common command
Here is an example of an assignment topic, Luogu Hash template question P3370 [template] string hash.
Mapmp; / / apply for a map, which means applying for a map called mp, which can map a string type to a bool type. Of course, the name and type can be changed mp ["abc"] = 1; / then the output mp ["abc"] will be 1 if there is no output in the previous step, it will be 0mp.size (); / / the size of the container is "does JavaScript have a stl library?" all the contents of this article, thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.