nl_tokens: Replaces any { @link com . linkedin . android . spyglass . ui . MentionsEditText . PlaceholderSpan } within the given text with the { @link MentionSpan } it contains .
pl_tokens: private void replacePlaceholdersWithCorrespondingMentionSpans ( @ NonNull Editable text ) { PlaceholderSpan [ ] tempSpans = text . getSpans ( 0 , text . length ( ) , PlaceholderSpan . class ) ; for ( PlaceholderSpan span : tempSpans ) { int spanStart = text . getSpanStart ( span ) ; String mentionDisplayString = span . holder . getDisplayString ( ) ; int end = Math . <mask> ( spanStart + mentionDisplayString . length ( ) , text . length ( ) ) ; text . replace ( spanStart , end , mentionDisplayString ) ; text . setSpan ( span . holder , spanStart , spanStart + mentionDisplayString . length ( ) , Spanned . SPAN_EXCLUSIVE_EXCLUSIVE ) ; text . removeSpan ( span ) ; } }