Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/lib/plugins/importoldchangelog/action.php on line 8 Strict Standards: Declaration of action_plugin_importoldindex::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/lib/plugins/importoldindex/action.php on line 57 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parserutils.php on line 205 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parserutils.php on line 208 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parserutils.php on line 389 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parserutils.php on line 530 Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/cache.php on line 291 Deprecated: Function split() is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/auth.php on line 154 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/auth.php on line 456 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/auth.php on line 456 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/auth.php on line 453 Strict Standards: Only variables should be passed by reference in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/doku.php on line 71 index_podretezce [Programování]
 
Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/parser.php on line 66 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/lexer.php on line 292 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 22 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 49 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 213 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 241 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 295 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 328 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/handler.php on line 575 Deprecated: Assigning the return value of new by reference is deprecated in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/inc/parser/xhtml.php on line 939
 
function indexPodretezce(retezec, podretezec: string): integer;
var
  zacatek: integer;
  indexRet, indexPodret: integer;
  nachaziSeTu: boolean;
begin
  for zacatek := 1 to length(retezec) - length(podretezec) + 1 do begin
      indexRet := zacatek;
      indexPodret := 1;
 
      nachaziSeTu := true;
      while indexPodret <= length(podretezec) do begin
          if retezec[indexRet] <> podretezec[indexPodret] then
              nachaziSeTu := false;
          inc(indexRet);
          inc(indexPodret);
      end;
 
      if nachaziSeTu then begin
          indexPodretezce := zacatek;
          exit;
      end;
  end;
 
  indexPodretezce := 0;
end;
 
var
  retezec, podretezec: string;
begin
  readln(retezec);
  readln(podretezec);
  writeln(indexPodretezce(retezec, podretezec));
end.
 
index_podretezce.txt · Poslední úprava: 2007/12/14 20:54 autor: rimsky
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Strict Standards: Only variables should be passed by reference in /DISK2/WWW/pavel-rimsky.cz/vyuka/wiki/doku.php on line 79