File: main.cc

package info (click to toggle)
gri 2.4.2-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,540 kB
  • ctags: 1,966
  • sloc: cpp: 32,542; lisp: 3,243; perl: 806; makefile: 548; sh: 253
file content (10 lines) | stat: -rw-r--r-- 241 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#include <string>
#include <stdio.h>
main()
{
    string l("\"hi dan \"hi");
    printf("'%s'\n", l.c_str());
    if (l[0] == '"')		l.remove(0,1);
    if (l[l.size() - 1] == '"')	l.remove(l.size()-1,1);
    printf("-> '%s'\n", l.c_str());
}