Within the third parameter from class() you could customize how the delimiter from the buckets should look like. But they will be identically for each bucket. If you really want a different char(s) for the beginning and ending of the buckets you would need to adjust the buckets with something like this:
and/or some further string-functions. If you only have a few buckets (and which you then needs to adjust) the advantage from the class-function against a normal nested-if-loop approach is quite less. But by many buckets which might be controlled by variables or are you handled with big amounts of the data everything the nested if-loops will be easier and better perform.
If you takes a further look on the default interpretation from class() they might be practically enough for most of your user.