Skip to content

Instantly share code, notes, and snippets.

@gnu-user
Created February 22, 2013 19:10
Show Gist options
  • Save gnu-user/5015780 to your computer and use it in GitHub Desktop.
Save gnu-user/5015780 to your computer and use it in GitHub Desktop.
A sample program to verify you have POCO installed and your makefiles are done right.
#include <iostream>
#include <string>
#include <stdio.h>
#include <Poco/String.h>
using Poco::trim;
using Poco::trimLeftInPlace;
using Poco::trimRight;
using Poco::trimRightInPlace;
using namespace std;
int main()
{
string hello(" Hello, world! ");
string s1(trimLeftInPlace(hello)); // "Hello, world! "
trimRightInPlace(s1); // "Hello, world!"
string s2(trim(hello)); // "Hello, world!"
cout << s1 << endl << s2 << endl;
return 0;
}
@gnu-user
Copy link
Author

The #include "Poco/String.h' is because I have a Poco/ folder inside the lib/include/ directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment