mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 15:29:57 +00:00
base: add 'String::print' method
This way, we can conveniently output strings without calling the string() method.
This commit is contained in:
parent
2127c8acf2
commit
38a1e95979
@ -14,7 +14,6 @@
|
||||
#ifndef _INCLUDE__BASE__OUTPUT_H_
|
||||
#define _INCLUDE__BASE__OUTPUT_H_
|
||||
|
||||
#include <util/string.h>
|
||||
#include <base/stdint.h>
|
||||
|
||||
namespace Genode { struct Output; }
|
||||
|
@ -16,6 +16,7 @@
|
||||
#define _INCLUDE__UTIL__STRING_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
#include <base/output.h>
|
||||
#include <util/misc_math.h>
|
||||
#include <cpu/string.h>
|
||||
|
||||
@ -557,6 +558,8 @@ class Genode::String
|
||||
{
|
||||
return strcmp(string(), other.string()) != 0;
|
||||
}
|
||||
|
||||
void print(Output &out) const { Genode::print(out, string()); }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__UTIL__STRING_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user