<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.zcubes.com/index.php?action=history&amp;feed=atom&amp;title=Yurttas%2FPL%2FOOL%2FCplusplus%2FF%2F07%2F02%2F02%2F00%2Fcount_pattern.cpp</id>
	<title>Yurttas/PL/OOL/Cplusplus/F/07/02/02/00/count pattern.cpp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.zcubes.com/index.php?action=history&amp;feed=atom&amp;title=Yurttas%2FPL%2FOOL%2FCplusplus%2FF%2F07%2F02%2F02%2F00%2Fcount_pattern.cpp"/>
	<link rel="alternate" type="text/html" href="http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Cplusplus/F/07/02/02/00/count_pattern.cpp&amp;action=history"/>
	<updated>2026-05-18T17:16:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Cplusplus/F/07/02/02/00/count_pattern.cpp&amp;diff=155853&amp;oldid=prev</id>
		<title>MassBot1: Created page with &quot;&lt;syntaxhighlight lang=&quot;cpp&quot; line start=&quot;1&quot; enclose=&quot;div&quot;&gt;/*     Copyright(C) 2002     All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..       Perm...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Cplusplus/F/07/02/02/00/count_pattern.cpp&amp;diff=155853&amp;oldid=prev"/>
		<updated>2013-11-07T05:03:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot; line start=&amp;quot;1&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/*     Copyright(C) 2002     All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..       Perm...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot; line start=&amp;quot;1&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/*&lt;br /&gt;
   Copyright(C) 2002&lt;br /&gt;
   All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..&lt;br /&gt;
&lt;br /&gt;
   Permission to use, copy, modify, and distribute this&lt;br /&gt;
   software and its documentation for EDUCATIONAL purposes&lt;br /&gt;
   and without fee is hereby granted provided that this&lt;br /&gt;
   copyright notice appears in all copies.&lt;br /&gt;
&lt;br /&gt;
   date   : September 1, 2002.&lt;br /&gt;
   author : Salih Yurttas.&lt;br /&gt;
&lt;br /&gt;
   count_pattern.cpp&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;common.h&amp;quot;&lt;br /&gt;
#include &amp;quot;pattern.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int count_pattern(vector&amp;lt;string&amp;gt;&amp;amp; lines) {&lt;br /&gt;
  int k = 0;&lt;br /&gt;
&lt;br /&gt;
  int p_l = pattern.length();&lt;br /&gt;
&lt;br /&gt;
  int n = lines.size();&lt;br /&gt;
&lt;br /&gt;
  for(int i=0; i&amp;lt;n; i++) {&lt;br /&gt;
    string a = lines[i];&lt;br /&gt;
    int l = a.length();&lt;br /&gt;
&lt;br /&gt;
    int p = 0;&lt;br /&gt;
&lt;br /&gt;
    while(l&amp;gt;=p_l) {&lt;br /&gt;
      int p = a.find(pattern);&lt;br /&gt;
&lt;br /&gt;
      if(p&amp;lt;0) break;&lt;br /&gt;
&lt;br /&gt;
      ++k;&lt;br /&gt;
&lt;br /&gt;
      a = a.substr(p+p_l,l-1);&lt;br /&gt;
&lt;br /&gt;
      l = a.length();&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return k;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>MassBot1</name></author>
	</entry>
</feed>