Yes,
In both cases you should customize the search query.
Example for D letter :
SELECT * FROM #__xxx WHERE name REGEXP '^d';
So, all you have to do is to add some code in : classes/jmodel.list.php :
function _buildSearch(...)
{
if (!isset($this->_searches[$instance]))
return;
$db= JFactory::getDBO();
$tests = array();
foreach($this->_searches[$instance] as $namespace => $search)
{
$test = "";
switch($search->method)
{
case 'like':
$test = $namespace . " LIKE " . $db->Quote("%%s%");
break;
case 'exact':
$test = $namespace . " = " . $db->Quote("%s");
break;
//ADD HERE
case 'startwith':
$test = $namespace . " = " . $db->Quote("^%s");
break;
//END
case '':
break;
}
if ($test)
$tests[] = $test;
}
...
So, where _addSearch() is called, change the search method name (you'll find this
)
To finish, call your page adding in the url : &search_xxxx=D (example)
Not tested,
Try it and please furnish the working solution.