File: correct-conversion.cpp

package info (click to toggle)
ctre 3.9.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,084 kB
  • sloc: cpp: 80,452; makefile: 135; javascript: 69; python: 31
file content (13 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
#include "ctre.hpp"

static constexpr auto pattern = ctll::fixed_string{ ".*" };

int main(void)
{
	std::string str{ "a\ta\nc\td" };
	std::string str2{ ctre::re< pattern >().match( str ).get< 0 >() };
	std::string str3( ctre::re< pattern >().match( str ).get< 0 >() );
	std::cout<<str2.size()<<'\t'<<str2;
	std::cout<<str3.size()<<'\t'<<str3;
}