How to add a class to edit_post_link?

My goal is obtain “Edit” button like this:

<a class="post-edit-link btn btn-default" href="{$url}">Edit this</a>

The first attempt I was trying adopt was adding before and after params:

edit_post_link( __('Edit this'), '<span class="btn btn-default">', '</span>');

But the result wasn’t satisfying:

<span class="btn btn-default">
    <a class="post-edit-link" href="{$url}">Edit this</a>
</span>

First of all, it’s redundant: I must still changing CSS to customize Edit button and there is nonsense to get more elements only to add CSS class.

Second attempt became the solution. I used apply filter to replace classes in string:

function dbj_edit_post_link($output) {
    $output = str_replace('class="post-edit-link"', 'class="post-edit-link btn btn-default"', $output);
    return $output;
}
add_filter('edit_post_link', 'dbj_edit_post_link');

And yes, this is what I want, but there are really no more less clunky solution to add class to “Edit” button?

Solutions Collecting From Web of "How to add a class to edit_post_link?"