iOS Question Return Application.LabelName

Discussion in 'iOS Questions' started by Mashiane, Jul 15, 2016.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi

    How does one return the Application.LabelName for B4i apps?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Mashiane

    Mashiane Expert Licensed User

    Thanks, so to return the last part of the package name, one could then...

    Code:
    Sub ApplicationLabel() As String
        
    Dim pn As String = GetPackageName
        
    Dim al As String = MvField(pn,3,".")
        
    Return al
    End Sub

    Sub MvField(sValue As String, iPosition As Int, Delimiter As StringAs String
       
    If sValue.Length = 0 Then Return ""
       
    Dim xPos As Int: xPos = sValue.IndexOf(Delimiter)
       
    If xPos = -1 Then Return sValue
       
    Dim mValues() As String
       
    Dim tValues As Int
       mValues = 
    Regex.split(Delimiter, sValue)
       tValues = mValues.Length -
    1
       
    Select Case iPosition
       
    Case -1
         
    Return mValues(tValues)
       
    Case -2
         
    Return mValues(tValues - 1)
       
    Case Else
         iPosition = iPosition - 
    1
         
    If iPosition <= -1 Then Return mValues(tValues)
         
    If iPosition > tValues Then Return ""
         
    Return mValues(iPosition)
       
    End Select
    End Sub
    This will do...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice