MCPcopy Create free account
hub / github.com/IntegralPilot/wasm_os / ostream

Class ostream

stdlib/cpp/iostream.hpp:136–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134namespace std {
135
136class ostream {
137public:
138 ostream& operator<<(int value) {
139 char buffer[12];
140 itoa(value, buffer);
141 puts(buffer);
142 return *this;
143 }
144
145 ostream& operator<<(long int value) {
146 char buffer[12];
147 litoa(value, buffer);
148 puts(buffer);
149 return *this;
150 }
151
152 ostream& operator<<(long long int value) {
153 char buffer[21];
154 llitoa(value, buffer);
155 puts(buffer);
156 return *this;
157 }
158
159 ostream& operator<<(const char* value) {
160 puts(value);
161 return *this;
162 }
163
164 ostream& operator<<(char value) {
165 putchar(value);
166 return *this;
167 }
168
169private:
170 void puts(const char* str) {
171 while (*str) {
172 putchar(*str);
173 str++;
174 }
175 }
176};
177
178ostream cout;
179

Callers

nothing calls this directly

Calls 4

putsFunction · 0.85
litoaFunction · 0.85
itoaFunction · 0.70
llitoaFunction · 0.70

Tested by

no test coverage detected