Extracts the key from a simple key-value pair.

ID: 1269

See: Before
				
					using uCalcSoftware;

var uc = new uCalc();
using (var s = new uCalc.String("user:admin")) {
   var key = s.Before(":");
   Console.WriteLine(key);
}
				
			
user
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   {
      uCalc::String s("user:admin");
      s.Owned(); // Causes s to be released when it goes out of scope
      auto key = s.Before(":");
      cout << key << endl;
   }
}
				
			
user
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Using s As New uCalc.String("user:admin")
         Dim key = s.Before(":")
         Console.WriteLine(key)
      End Using
   End Sub
End Module
				
			
user