MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getTransformedText

Function getTransformedText

packages/core/ui/text-base/index.android.ts:577–593  ·  view source on GitHub ↗
(text: string, textTransform: CoreTypes.TextTransformType)

Source from the content-addressed store, hash-verified

575}
576
577export function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string {
578 if (!text || !isString(text)) {
579 return '';
580 }
581
582 switch (textTransform) {
583 case 'uppercase':
584 return text.toUpperCase();
585 case 'lowercase':
586 return text.toLowerCase();
587 case 'capitalize':
588 return getCapitalizedString(text);
589 case 'none':
590 default:
591 return text;
592 }
593}
594
595function isStringTappable(formattedString: FormattedString) {
596 if (!formattedString) {

Callers 3

getTransformationMethod · 0.70
_setNativeTextMethod · 0.70

Calls 2

isStringFunction · 0.90
getCapitalizedStringFunction · 0.85

Tested by

no test coverage detected