Languages

Fsharp
ActionScript
xBase
Clean
GPSS
PureBasic
Sieve
Erlang
JOVIAL
Mercury
Linda
DataFlex
PostScript
FoxPro2
VFP
Cobol
Prolog
Jython
Awk
VisualBasic
JavaScript
Matlab
ASP
Haskell
Csharp
D
Smalltalk
Nemerle
Pixilang
Java
SQL
Python
ObjectPascal
Ruby
Perl
Pascal
Assembler
PHP
C
Functions  Add function  Users  Registration  Enter   About  ASCII Table  Our helpers

strspn in PHP

(PHP 4, PHP 5)

strspn — Find length of initial segment matching mask
Description
int strspn ( string $str1, string $str2 [, int $start [, int $length]] )

Returns the length of the initial segment of str1 which consists entirely of characters in str2.

The line of code:
<?php
$var = strspn("42 is the answer, what is the question ...", "1234567890");
?>
will assign 2 to $var, because the string "42" will be the longest segment containing characters from "1234567890".

As of PHP 4.3.0, strspn() accepts two optional integer parameters that can be used to define the start position and the length of the string to examine.

<?php
echo strspn("foo", "o", 1, 2); // 2
?>

Note: This function is binary-safe.
Doing for this function is string
Add by Pancho
You can edit it here
abcarticle.ru (blockart[dog]mail[dot]ru)
e4o3D8 <a href="http://fuhvuwzzdpab.com/">fuhvuwzzdpab</a>, [url=http://zocjwxwjkuaj.com/]zocjwxwjkuaj[/url], [link=http://nkagofaqyqqv.com/]nkagofaqyqqv[/link], http://gcmuprvvaxyb.com/
abcarticle.ru (blockart[dog]mail[dot]ru)
e4o3D8 <a href="http://fuhvuwzzdpab.com/">fuhvuwzzdpab</a>, [url=http://zocjwxwjkuaj.com/]zocjwxwjkuaj[/url], [link=http://nkagofaqyqqv.com/]nkagofaqyqqv[/link], http://gcmuprvvaxyb.com/
abcarticle.ru (blockart[dog]mail[dot]ru)
67qUMc <a href="http://kwqtghdfrxsk.com/">kwqtghdfrxsk</a>, [url=http://vvvaamgqmxbg.com/]vvvaamgqmxbg[/url], [link=http://tuftcodnvhrv.com/]tuftcodnvhrv[/link], http://sfpthinzadqq.com/
Adding comments is available only for registered users.

Latest "Green" Packing Material? Mushrooms!

EcoCradle packaging material is composed of agricultural byproducts bound by fungal roots.

A new packing material that grows itself is now appearing in shipped products across the country.

The composite of inedible agricultural waste and mushroom roots is called Mycobond™, and its manufacture requires just one eighth the energy and one tenth the carbon dioxide of traditional foam packing material.

And unlike most foam substitutes, when no longer useful, it makes great compost in the garden.

The technology was the brainchild of two former Rensselaer ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117385&WT.mc_id=USNSF_51&WT.mc_ev=click


This is an NSF News item.

PycckaR
BepcuR


Articles
Articles


Library
Library


Downloads
Downloads

Google Chrome Golf 6
 © Internet, books, teachers and Rudevich Alexander brains.