PHP Classes

Sum of Alphabets: Calculate the sum of codes of letters in a string

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 51 All time: 10,675 This week: 126Up
Version License PHP version Categories
sumofalphabets 7The PHP License5PHP 5, Text processing
Description 

Author

This class can calculate the sum of codes of letters in a string.

It takes the a given string and extract all the characters that are letters in a string.

The class can map each letter to a number that is the position of that letter in the alphabet and the returns the number that represents the sum of the numbers for each letter.

Picture of Mr. Dharmendra Kumar
  Performance   Level  
Name: Mr. Dharmendra Kumar <contact>
Classes: 8 packages by
Country: India India
Age: ???
All time rank: 3369224 in India India
Week rank: 158 Up15 in India India Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
require_once("SumofAlphabets.php");

$obj=new SumofAlphabets();

$str='Hello World';
$sum = $obj->do($str);
echo
$sum;


  Files folder image Files (2)  
File Role Description
Plain text file howtouse.php Example Example script
Plain text file SumofAlphabets.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:51
This week:0
All time:10,675
This week:126Up