1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +00:00

Everywhere: Add sv suffix to strings relying on StringView(char const*)

Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
This commit is contained in:
sin-ack 2022-07-11 17:32:29 +00:00 committed by Andreas Kling
parent e5f09ea170
commit 3f3f45580a
762 changed files with 8315 additions and 8316 deletions

View file

@ -77,6 +77,6 @@ template<>
struct AK::Formatter<Gfx::AffineTransform> : Formatter<FormatString> {
ErrorOr<void> format(FormatBuilder& builder, Gfx::AffineTransform const& value)
{
return Formatter<FormatString>::format(builder, "[{} {} {} {} {} {}]", value.a(), value.b(), value.c(), value.d(), value.e(), value.f());
return Formatter<FormatString>::format(builder, "[{} {} {} {} {} {}]"sv, value.a(), value.b(), value.c(), value.d(), value.e(), value.f());
}
};

View file

@ -104,7 +104,7 @@ ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_wrapper(BitmapFormat format, I
ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_load_from_file(StringView path, int scale_factor)
{
if (scale_factor > 1 && path.starts_with("/res/")) {
if (scale_factor > 1 && path.starts_with("/res/"sv)) {
LexicalPath lexical_path { path };
StringBuilder highdpi_icon_path;
TRY(highdpi_icon_path.try_appendff("{}/{}-{}x.{}", lexical_path.dirname(), lexical_path.title(), scale_factor, lexical_path.extension()));

View file

@ -100,8 +100,8 @@ public:
static bool is_path_a_supported_image_format(StringView path)
{
#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \
if (path.ends_with(Ext, CaseSensitivity::CaseInsensitive)) \
#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \
if (path.ends_with(Ext##sv, CaseSensitivity::CaseInsensitive)) \
return true;
ENUMERATE_IMAGE_FORMATS
#undef __ENUMERATE_IMAGE_FORMAT

View file

@ -409,10 +409,10 @@ static Gfx::Bitmap const& circle_bitmap(bool checked, bool changing)
void ClassicStylePainter::paint_radio_button(Painter& painter, IntRect const& rect, Palette const&, bool is_checked, bool is_being_pressed)
{
if (!s_unfilled_circle_bitmap) {
s_unfilled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/unfilled-radio-circle.png").release_value_but_fixme_should_propagate_errors();
s_filled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/filled-radio-circle.png").release_value_but_fixme_should_propagate_errors();
s_changing_filled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/changing-filled-radio-circle.png").release_value_but_fixme_should_propagate_errors();
s_changing_unfilled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/changing-unfilled-radio-circle.png").release_value_but_fixme_should_propagate_errors();
s_unfilled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/unfilled-radio-circle.png"sv).release_value_but_fixme_should_propagate_errors();
s_filled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/filled-radio-circle.png"sv).release_value_but_fixme_should_propagate_errors();
s_changing_filled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/changing-filled-radio-circle.png"sv).release_value_but_fixme_should_propagate_errors();
s_changing_unfilled_circle_bitmap = Bitmap::try_load_from_file("/res/icons/serenity/changing-unfilled-radio-circle.png"sv).release_value_but_fixme_should_propagate_errors();
}
auto& bitmap = circle_bitmap(is_checked, is_being_pressed);
@ -428,7 +428,7 @@ static constexpr Gfx::CharacterBitmap s_checked_bitmap {
" ##### "
" ### "
" # "
" ",
" "sv,
9, 9
};

View file

@ -29,7 +29,7 @@ String Color::to_string_without_alpha() const
static Optional<Color> parse_rgb_color(StringView string)
{
VERIFY(string.starts_with("rgb(", CaseSensitivity::CaseInsensitive));
VERIFY(string.starts_with("rgb("sv, CaseSensitivity::CaseInsensitive));
VERIFY(string.ends_with(")"));
auto substring = string.substring_view(4, string.length() - 5);
@ -50,7 +50,7 @@ static Optional<Color> parse_rgb_color(StringView string)
static Optional<Color> parse_rgba_color(StringView string)
{
VERIFY(string.starts_with("rgba(", CaseSensitivity::CaseInsensitive));
VERIFY(string.starts_with("rgba("sv, CaseSensitivity::CaseInsensitive));
VERIFY(string.ends_with(")"));
auto substring = string.substring_view(5, string.length() - 6);
@ -244,7 +244,7 @@ Optional<Color> Color::from_string(StringView string)
{ 0x000000, nullptr }
};
if (string.equals_ignoring_case("transparent"))
if (string.equals_ignoring_case("transparent"sv))
return Color::from_argb(0x00000000);
for (size_t i = 0; !web_colors[i].name.is_null(); ++i) {
@ -252,10 +252,10 @@ Optional<Color> Color::from_string(StringView string)
return Color::from_rgb(web_colors[i].color);
}
if (string.starts_with("rgb(", CaseSensitivity::CaseInsensitive) && string.ends_with(")"))
if (string.starts_with("rgb("sv, CaseSensitivity::CaseInsensitive) && string.ends_with(")"))
return parse_rgb_color(string);
if (string.starts_with("rgba(", CaseSensitivity::CaseInsensitive) && string.ends_with(")"))
if (string.starts_with("rgba("sv, CaseSensitivity::CaseInsensitive) && string.ends_with(")"))
return parse_rgba_color(string);
if (string[0] != '#')

View file

@ -806,27 +806,27 @@ void DDSLoadingContext::dump_debug()
{
StringBuilder builder;
builder.append("\nDDS:\n");
builder.append("\nDDS:\n"sv);
builder.appendff("\tHeader Size: {}\n", header.size);
builder.append("\tFlags:");
builder.append("\tFlags:"sv);
if ((header.flags & DDSFlags::DDSD_CAPS) == DDSFlags::DDSD_CAPS)
builder.append(" DDSD_CAPS");
builder.append(" DDSD_CAPS"sv);
if ((header.flags & DDSFlags::DDSD_HEIGHT) == DDSFlags::DDSD_HEIGHT)
builder.append(" DDSD_HEIGHT");
builder.append(" DDSD_HEIGHT"sv);
if ((header.flags & DDSFlags::DDSD_WIDTH) == DDSFlags::DDSD_WIDTH)
builder.append(" DDSD_WIDTH");
builder.append(" DDSD_WIDTH"sv);
if ((header.flags & DDSFlags::DDSD_PITCH) == DDSFlags::DDSD_PITCH)
builder.append(" DDSD_PITCH");
builder.append(" DDSD_PITCH"sv);
if ((header.flags & DDSFlags::DDSD_PIXELFORMAT) == DDSFlags::DDSD_PIXELFORMAT)
builder.append(" DDSD_PIXELFORMAT");
builder.append(" DDSD_PIXELFORMAT"sv);
if ((header.flags & DDSFlags::DDSD_MIPMAPCOUNT) == DDSFlags::DDSD_MIPMAPCOUNT)
builder.append(" DDSD_MIPMAPCOUNT");
builder.append(" DDSD_MIPMAPCOUNT"sv);
if ((header.flags & DDSFlags::DDSD_LINEARSIZE) == DDSFlags::DDSD_LINEARSIZE)
builder.append(" DDSD_LINEARSIZE");
builder.append(" DDSD_LINEARSIZE"sv);
if ((header.flags & DDSFlags::DDSD_DEPTH) == DDSFlags::DDSD_DEPTH)
builder.append(" DDSD_DEPTH");
builder.append("\n");
builder.append(" DDSD_DEPTH"sv);
builder.append("\n"sv);
builder.appendff("\tHeight: {}\n", header.height);
builder.appendff("\tWidth: {}\n", header.width);
@ -834,105 +834,105 @@ void DDSLoadingContext::dump_debug()
builder.appendff("\tDepth: {}\n", header.depth);
builder.appendff("\tMipmap Count: {}\n", header.mip_map_count);
builder.append("\tCaps:");
builder.append("\tCaps:"sv);
if ((header.caps1 & Caps1Flags::DDSCAPS_COMPLEX) == Caps1Flags::DDSCAPS_COMPLEX)
builder.append(" DDSCAPS_COMPLEX");
builder.append(" DDSCAPS_COMPLEX"sv);
if ((header.caps1 & Caps1Flags::DDSCAPS_MIPMAP) == Caps1Flags::DDSCAPS_MIPMAP)
builder.append(" DDSCAPS_MIPMAP");
builder.append(" DDSCAPS_MIPMAP"sv);
if ((header.caps1 & Caps1Flags::DDSCAPS_TEXTURE) == Caps1Flags::DDSCAPS_TEXTURE)
builder.append(" DDSCAPS_TEXTURE");
builder.append("\n");
builder.append(" DDSCAPS_TEXTURE"sv);
builder.append("\n"sv);
builder.append("\tCaps2:");
builder.append("\tCaps2:"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP) == Caps2Flags::DDSCAPS2_CUBEMAP)
builder.append(" DDSCAPS2_CUBEMAP");
builder.append(" DDSCAPS2_CUBEMAP"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEX) == Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEX)
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEX");
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEX"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEX) == Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEX)
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEX");
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEX"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEY) == Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEY)
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEY");
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEY"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEY) == Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEY)
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEY");
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEY"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEZ) == Caps2Flags::DDSCAPS2_CUBEMAP_POSITIVEZ)
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEZ");
builder.append(" DDSCAPS2_CUBEMAP_POSITIVEZ"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEZ) == Caps2Flags::DDSCAPS2_CUBEMAP_NEGATIVEZ)
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEZ");
builder.append(" DDSCAPS2_CUBEMAP_NEGATIVEZ"sv);
if ((header.caps2 & Caps2Flags::DDSCAPS2_VOLUME) == Caps2Flags::DDSCAPS2_VOLUME)
builder.append(" DDSCAPS2_VOLUME");
builder.append("\n");
builder.append(" DDSCAPS2_VOLUME"sv);
builder.append("\n"sv);
builder.append("Pixel Format:\n");
builder.append("Pixel Format:\n"sv);
builder.appendff("\tStruct Size: {}\n", header.pixel_format.size);
builder.append("\tFlags:");
builder.append("\tFlags:"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_ALPHAPIXELS) == PixelFormatFlags::DDPF_ALPHAPIXELS)
builder.append(" DDPF_ALPHAPIXELS");
builder.append(" DDPF_ALPHAPIXELS"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_ALPHA) == PixelFormatFlags::DDPF_ALPHA)
builder.append(" DDPF_ALPHA");
builder.append(" DDPF_ALPHA"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_FOURCC) == PixelFormatFlags::DDPF_FOURCC)
builder.append(" DDPF_FOURCC");
builder.append(" DDPF_FOURCC"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_PALETTEINDEXED8) == PixelFormatFlags::DDPF_PALETTEINDEXED8)
builder.append(" DDPF_PALETTEINDEXED8");
builder.append(" DDPF_PALETTEINDEXED8"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_RGB) == PixelFormatFlags::DDPF_RGB)
builder.append(" DDPF_RGB");
builder.append(" DDPF_RGB"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_YUV) == PixelFormatFlags::DDPF_YUV)
builder.append(" DDPF_YUV");
builder.append(" DDPF_YUV"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_LUMINANCE) == PixelFormatFlags::DDPF_LUMINANCE)
builder.append(" DDPF_LUMINANCE");
builder.append(" DDPF_LUMINANCE"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_BUMPDUDV) == PixelFormatFlags::DDPF_BUMPDUDV)
builder.append(" DDPF_BUMPDUDV");
builder.append(" DDPF_BUMPDUDV"sv);
if ((header.pixel_format.flags & PixelFormatFlags::DDPF_NORMAL) == PixelFormatFlags::DDPF_NORMAL)
builder.append(" DDPF_NORMAL");
builder.append("\n");
builder.append(" DDPF_NORMAL"sv);
builder.append("\n"sv);
builder.append("\tFour CC: ");
builder.append("\tFour CC: "sv);
builder.appendff("{:c}", (header.pixel_format.four_cc >> (8 * 0)) & 0xFF);
builder.appendff("{:c}", (header.pixel_format.four_cc >> (8 * 1)) & 0xFF);
builder.appendff("{:c}", (header.pixel_format.four_cc >> (8 * 2)) & 0xFF);
builder.appendff("{:c}", (header.pixel_format.four_cc >> (8 * 3)) & 0xFF);
builder.append("\n");
builder.append("\n"sv);
builder.appendff("\tRGB Bit Count: {}\n", header.pixel_format.rgb_bit_count);
builder.appendff("\tR Bit Mask: {}\n", header.pixel_format.r_bit_mask);
builder.appendff("\tG Bit Mask: {}\n", header.pixel_format.g_bit_mask);
builder.appendff("\tB Bit Mask: {}\n", header.pixel_format.b_bit_mask);
builder.appendff("\tA Bit Mask: {}\n", header.pixel_format.a_bit_mask);
builder.append("DDS10:\n");
builder.append("DDS10:\n"sv);
builder.appendff("\tFormat: {}\n", static_cast<u32>(header10.format));
builder.append("\tResource Dimension:");
builder.append("\tResource Dimension:"sv);
if ((header10.resource_dimension & ResourceDimensions::DDS_DIMENSION_UNKNOWN) == ResourceDimensions::DDS_DIMENSION_UNKNOWN)
builder.append(" DDS_DIMENSION_UNKNOWN");
builder.append(" DDS_DIMENSION_UNKNOWN"sv);
if ((header10.resource_dimension & ResourceDimensions::DDS_DIMENSION_BUFFER) == ResourceDimensions::DDS_DIMENSION_BUFFER)
builder.append(" DDS_DIMENSION_BUFFER");
builder.append(" DDS_DIMENSION_BUFFER"sv);
if ((header10.resource_dimension & ResourceDimensions::DDS_DIMENSION_TEXTURE1D) == ResourceDimensions::DDS_DIMENSION_TEXTURE1D)
builder.append(" DDS_DIMENSION_TEXTURE1D");
builder.append(" DDS_DIMENSION_TEXTURE1D"sv);
if ((header10.resource_dimension & ResourceDimensions::DDS_DIMENSION_TEXTURE2D) == ResourceDimensions::DDS_DIMENSION_TEXTURE2D)
builder.append(" DDS_DIMENSION_TEXTURE2D");
builder.append(" DDS_DIMENSION_TEXTURE2D"sv);
if ((header10.resource_dimension & ResourceDimensions::DDS_DIMENSION_TEXTURE3D) == ResourceDimensions::DDS_DIMENSION_TEXTURE3D)
builder.append(" DDS_DIMENSION_TEXTURE3D");
builder.append("\n");
builder.append(" DDS_DIMENSION_TEXTURE3D"sv);
builder.append("\n"sv);
builder.appendff("\tArray Size: {}\n", header10.array_size);
builder.append("\tMisc Flags:");
builder.append("\tMisc Flags:"sv);
if ((header10.misc_flag & MiscFlags::DDS_RESOURCE_MISC_TEXTURECUBE) == MiscFlags::DDS_RESOURCE_MISC_TEXTURECUBE)
builder.append(" DDS_RESOURCE_MISC_TEXTURECUBE");
builder.append("\n");
builder.append(" DDS_RESOURCE_MISC_TEXTURECUBE"sv);
builder.append("\n"sv);
builder.append("\tMisc Flags 2:");
builder.append("\tMisc Flags 2:"sv);
if ((header10.misc_flag2 & Misc2Flags::DDS_ALPHA_MODE_UNKNOWN) == Misc2Flags::DDS_ALPHA_MODE_UNKNOWN)
builder.append(" DDS_ALPHA_MODE_UNKNOWN");
builder.append(" DDS_ALPHA_MODE_UNKNOWN"sv);
if ((header10.misc_flag2 & Misc2Flags::DDS_ALPHA_MODE_STRAIGHT) == Misc2Flags::DDS_ALPHA_MODE_STRAIGHT)
builder.append(" DDS_ALPHA_MODE_STRAIGHT");
builder.append(" DDS_ALPHA_MODE_STRAIGHT"sv);
if ((header10.misc_flag2 & Misc2Flags::DDS_ALPHA_MODE_PREMULTIPLIED) == Misc2Flags::DDS_ALPHA_MODE_PREMULTIPLIED)
builder.append(" DDS_ALPHA_MODE_PREMULTIPLIED");
builder.append(" DDS_ALPHA_MODE_PREMULTIPLIED"sv);
if ((header10.misc_flag2 & Misc2Flags::DDS_ALPHA_MODE_OPAQUE) == Misc2Flags::DDS_ALPHA_MODE_OPAQUE)
builder.append(" DDS_ALPHA_MODE_OPAQUE");
builder.append(" DDS_ALPHA_MODE_OPAQUE"sv);
if ((header10.misc_flag2 & Misc2Flags::DDS_ALPHA_MODE_CUSTOM) == Misc2Flags::DDS_ALPHA_MODE_CUSTOM)
builder.append(" DDS_ALPHA_MODE_CUSTOM");
builder.append("\n");
builder.append(" DDS_ALPHA_MODE_CUSTOM"sv);
builder.append("\n"sv);
dbgln("{}", builder.to_string());
}

View file

@ -31,7 +31,7 @@ Bitmap const* Emoji::emoji_for_code_points(Span<u32> const& code_points)
if (it != s_emojis.end())
return (*it).value.ptr();
auto basename = String::join('_', code_points, "U+{:X}");
auto basename = String::join('_', code_points, "U+{:X}"sv);
auto bitmap_or_error = Bitmap::try_load_from_file(String::formatted("/res/emoji/{}.png", basename));
if (bitmap_or_error.is_error()) {
s_emojis.set(code_points, nullptr);

View file

@ -16,7 +16,7 @@ namespace Gfx {
struct PBM {
static constexpr auto ascii_magic_number = '1';
static constexpr auto binary_magic_number = '4';
static constexpr StringView image_type = "PBM";
static constexpr StringView image_type = "PBM"sv;
};
using PBMLoadingContext = PortableImageMapLoadingContext<PBM>;

View file

@ -16,7 +16,7 @@ namespace Gfx {
struct PGM {
static constexpr auto ascii_magic_number = '2';
static constexpr auto binary_magic_number = '5';
static constexpr StringView image_type = "PGM";
static constexpr StringView image_type = "PGM"sv;
u16 max_val { 0 };
};

View file

@ -16,7 +16,7 @@ namespace Gfx {
struct PPM {
static constexpr auto ascii_magic_number = '3';
static constexpr auto binary_magic_number = '6';
static constexpr StringView image_type = "PPM";
static constexpr StringView image_type = "PPM"sv;
u16 max_val { 0 };
};

View file

@ -180,39 +180,39 @@ void Path::close_all_subpaths()
String Path::to_string() const
{
StringBuilder builder;
builder.append("Path { ");
builder.append("Path { "sv);
for (auto& segment : m_segments) {
switch (segment.type()) {
case Segment::Type::MoveTo:
builder.append("MoveTo");
builder.append("MoveTo"sv);
break;
case Segment::Type::LineTo:
builder.append("LineTo");
builder.append("LineTo"sv);
break;
case Segment::Type::QuadraticBezierCurveTo:
builder.append("QuadraticBezierCurveTo");
builder.append("QuadraticBezierCurveTo"sv);
break;
case Segment::Type::CubicBezierCurveTo:
builder.append("CubicBezierCurveTo");
builder.append("CubicBezierCurveTo"sv);
break;
case Segment::Type::EllipticalArcTo:
builder.append("EllipticalArcTo");
builder.append("EllipticalArcTo"sv);
break;
case Segment::Type::Invalid:
builder.append("Invalid");
builder.append("Invalid"sv);
break;
}
builder.appendff("({}", segment.point());
switch (segment.type()) {
case Segment::Type::QuadraticBezierCurveTo:
builder.append(", ");
builder.append(", "sv);
builder.append(static_cast<QuadraticBezierCurveSegment const&>(segment).through().to_string());
break;
case Segment::Type::CubicBezierCurveTo:
builder.append(", ");
builder.append(", "sv);
builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_0().to_string());
builder.append(", ");
builder.append(", "sv);
builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_1().to_string());
break;
case Segment::Type::EllipticalArcTo: {
@ -229,7 +229,7 @@ String Path::to_string() const
break;
}
builder.append(") ");
builder.append(") "sv);
}
builder.append("}");
return builder.to_string();

View file

@ -245,15 +245,15 @@ enum class PathRole {
__Count,
};
inline char const* to_string(PathRole role)
inline StringView to_string(PathRole role)
{
switch (role) {
case PathRole::NoRole:
return "NoRole";
return "NoRole"sv;
#undef __ENUMERATE_PATH_ROLE
#define __ENUMERATE_PATH_ROLE(role) \
case PathRole::role: \
return #role;
return #role##sv;
ENUMERATE_PATH_ROLES(__ENUMERATE_PATH_ROLE)
#undef __ENUMERATE_PATH_ROLE
default:

View file

@ -187,7 +187,7 @@ String TextLayout::elide_text_from_right(Utf8View text, bool force_elision) cons
{
size_t text_width = m_font->width(text);
if (force_elision || text_width > static_cast<unsigned>(m_rect.width())) {
size_t ellipsis_width = m_font->width("...");
size_t ellipsis_width = m_font->width("..."sv);
size_t current_width = ellipsis_width;
size_t glyph_spacing = m_font->glyph_spacing();
@ -211,7 +211,7 @@ String TextLayout::elide_text_from_right(Utf8View text, bool force_elision) cons
StringBuilder builder;
builder.append(text.substring_view(0, offset).as_string());
builder.append("...");
builder.append("..."sv);
return builder.to_string();
}
}