Class StringExtensionsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static String snakeToLowerCamelCase(String $self) Converts string written in snake case to String in camel case with the first symbol in lower case.
      final static String lowerCamelCaseToGetter(String $self)
      final static Pair<String, String> cidToTypeAndId(String $self) Parses CID of channel to channelType and channelId.
      final static StreamCdnOriginalImageDimensions getStreamCdnHostedImageDimensions(String $self) Returns StreamCdnOriginalImageDimensions if the image is hosted by Stream's CDN and is resizable, otherwise returns null.
      final static String createResizedStreamCdnImageUrl(String $self, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) Float resizedWidthPercentage, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) Float resizedHeightPercentage, StreamCdnResizeImageMode resizeMode, StreamCdnCropImageMode cropMode) Generates a string URL with Stream CDN image resizing query parameters added to it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • snakeToLowerCamelCase

         final static String snakeToLowerCamelCase(String $self)

        Converts string written in snake case to String in camel case with the first symbol in lower case. For example string "created_at_some_time" is converted to "createdAtSomeTime".

      • getStreamCdnHostedImageDimensions

         final static StreamCdnOriginalImageDimensions getStreamCdnHostedImageDimensions(String $self)

        Returns StreamCdnOriginalImageDimensions if the image is hosted by Stream's CDN and is resizable, otherwise returns null.

      • createResizedStreamCdnImageUrl

         final static String createResizedStreamCdnImageUrl(String $self, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) Float resizedWidthPercentage, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) Float resizedHeightPercentage, StreamCdnResizeImageMode resizeMode, StreamCdnCropImageMode cropMode)

        Generates a string URL with Stream CDN image resizing query parameters added to it. Once this URL is called, Stream's CDN will generate a resized image which is accessible using the link returned by this function.

        Parameters:
        resizedWidthPercentage - The percentage of the original image width the resized image width will be.
        resizedHeightPercentage - The percentage of the original image height the resized image height will be.
        resizeMode - Sets the image resizing mode.
        cropMode - Sets the image crop mode.