How to limit character length in BuddyPress function output [closed]

I think buddypress has a get* version of that function that returns the value instead of showing it on the screen.

So just cut the returned string after a certain amount of characters, like 50:

$profile_bio = bp_get_member_profile_data( 'field=Brief Biography' );

if(strlen($profile_bio) > 50))
  $profile_bio = substr($profile_bio, 0, 50).'...';

echo $profile_bio;

If there’s no get function you can always use output buffering:

ob_start();
bp_member_profile_data( 'field=Brief Biography' );  
$profile_bio = ob_get_clean();

// rest of the code is the same