mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-22 01:34:13 -05:00
29 lines
817 B
C++
29 lines
817 B
C++
#include "remote/Form.hpp"
|
|
|
|
remote::Form::Form(const remote::Form &form) { m_form = form.m_form; }
|
|
|
|
remote::Form::Form(remote::Form &&form) noexcept { m_form = std::move(form.m_form); }
|
|
|
|
remote::Form &remote::Form::operator=(const remote::Form &form)
|
|
{
|
|
m_form = form.m_form;
|
|
return *this;
|
|
}
|
|
|
|
remote::Form &remote::Form::operator=(remote::Form &&form) noexcept
|
|
{
|
|
m_form = std::move(form.m_form);
|
|
return *this;
|
|
}
|
|
|
|
remote::Form &remote::Form::append_parameter(std::string_view param, std::string_view value)
|
|
{
|
|
if (!m_form.empty() && m_form.back() != '&') { m_form.append("&"); }
|
|
m_form.append(param).append("=").append(value);
|
|
return *this;
|
|
}
|
|
|
|
const char *remote::Form::get() const noexcept { return m_form.c_str(); }
|
|
|
|
size_t remote::Form::length() const noexcept { return m_form.length(); }
|