Commit bb20af8f authored by Max Kellermann's avatar Max Kellermann

util/StringStrip: use std::strlen()

parent 9355ec44
/*
* Copyright 2009-2018 Max Kellermann <max.kellermann@gmail.com>
* Copyright 2009-2020 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -30,7 +30,7 @@
#include "StringStrip.hxx"
#include "CharUtil.hxx"
#include <string.h>
#include <cstring>
const char *
StripLeft(const char *p) noexcept
......@@ -71,7 +71,7 @@ StripRight(const char *p, std::size_t length) noexcept
void
StripRight(char *p) noexcept
{
std::size_t old_length = strlen(p);
std::size_t old_length = std::strlen(p);
std::size_t new_length = StripRight(p, old_length);
p[new_length] = 0;
}
......
/*
* Copyright 2009-2018 Max Kellermann <max.kellermann@gmail.com>
* Copyright 2009-2020 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment