1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-24 15:22:23 +01:00
Files
archived-doc-tr/reference/strings/functions/substr-count.xml
2022-11-17 16:44:37 +03:00

182 lines
4.9 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e095023e408c8cb6378ae16bb6870343a3946919 Maintainer: nilgun Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr-count">
<refnamediv>
<refname>substr_count</refname>
<refpurpose>Bir dizge içinde belli bir alt dizgeden kaç tane bulunduğunu
bulur</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>substr_count</methodname>
<methodparam><type>string</type><parameter>samanlık</parameter></methodparam>
<methodparam><type>string</type><parameter>iğne</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>başlangıç</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>uzunluk</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>substr_count</function> işlevi <parameter>samanlık</parameter>
dizgesi içindeki <parameter>iğne</parameter> alt dizgelerinin sayısını
döndürür. <parameter>iğne</parameter> bağımsız değişkeni harf büyüklüğüne
duyarlıdır.
</para>
<note>
<para>
Bu işlev, birbirinin üstüne binmiş alt dizgeleri saymaz. Örnek için
aşağıya bakın!
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>samanlık</parameter></term>
<listitem>
<para>
Araştırılacak dizge.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>iğne</parameter></term>
<listitem>
<para>
Aranacak dizge.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>başlangıç</parameter></term>
<listitem>
<para>
Saymaya başlanacak konum. Negatifse saymaya dizgenin sonundan başlanır.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>uzunluk</parameter></term>
<listitem>
<para>
Dizgenin ne kadarlık parçasında arama yapılacağı burada belirtilir.
Eğer <parameter>başlangıç</parameter> artı <parameter>uzunluk</parameter>,
<parameter>samanlık</parameter> uzunluğundan büyük ise bir uyarı oluşur.
<parameter>uzunluk</parameter> negatifse
<parameter>samanlık</parameter> dizgesinin sonundan başlar.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
İşlev bir tamsayı döndürür.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>uzunluk</parameter> artık &null; olabiliyor.
</entry>
</row>
<row>
<entry>7.1.0</entry>
<entry>
Negatif <parameter>başlangıç</parameter> ve
<parameter>uzunluk</parameter> desteği eklendi.
<parameter>uzunluk</parameter> ayrıca, artık <literal>0</literal>
olabiliyor.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>- <function>substr_count</function> örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$text = 'This is a test';
echo strlen($text); // 14
echo substr_count($text, 'is'); // 2
// Arama 's is a test' parçasında yapılır ve 1 basılır
echo substr_count($text, 'is', 3);
// Arama 's i' parçasında yapılır ve 0 basılır
echo substr_count($text, 'is', 3, 3);
// 5+10 > 14 olduğundan bir uyarı verilir
echo substr_count($text, 'is', 5, 10);
// üst üste binen alt dizgeleri saymadığından sadece 1 basılır
$text2 = 'gcdgcdgcd';
echo substr_count($text2, 'gcdgcd');
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>count_chars</function></member>
<member><function>strpos</function></member>
<member><function>substr</function></member>
<member><function>strstr</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->