src/sys/dotnet/fanx/util/FanUtil.cs
/// <summary>
/// Split a qualifed type name into two strings, where
/// s[0] is the namespace, and s[1] is the simple type
/// name.
/// If qname represents a nested class, then s[0] will
/// be the qualified type name of the parent, and s[1]
/// will simply be the nested class name.
/// If qname represnets a generic class, then s[0] will
/// be the qualified type name of the class, and s[1]
/// will be the generic param.
/// </summary>
Split a qualifed type name into two strings, where
s[0] is the namespace, and s[1] is the simple type
name.
If qname represents a nested class, then s[0] will
be the qualified type name of the parent, and s[1]
will simply be the nested class name.
If qname represnets a generic class, then s[0] will
be the qualified type name of the class, and s[1]
will be the generic param.
Split a qualifed type name into two strings where s [ 0 ] is the namespace and s [ 1 ] is the simple type name . If qname represents a nested class then s [ 0 ] will be the qualified type name of the parent and s [ 1 ] will simply be the nested class name . If qname represnets a generic class then s [ 0 ] will be the qualified type name of the class and s [ 1 ] will be the generic param .
public static string[] splitQName(string qname)
    {
      string[] s = new string[] { null, qname };
      int index = qname.LastIndexOf('/');
      if (index != -1)
      {
        s[0] = qname.Substring(0, index);
        s[1] = qname.Substring(index+1);
      }
      else
      {
          index = qname.LastIndexOf('.');
          if (index != -1)
          {
            s[0] = qname.Substring(0, index);
            s[1] = qname.Substring(index+1);
          }
      }
      return s;
    }
public static string [ ] splitQName ( string qname ) { string [ ] s = new string [ ] { null , qname } ; int index = qname . LastIndexOf ( ' ' ) ; if ( index != - 1 ) { s [ 0 ] = qname . Substring ( 0 , index ) ; s [ 1 ] = qname . Substring ( index + 1 ) ; } else { index = qname . LastIndexOf ( ' ' ) ; if ( index != - 1 ) { s [ 0 ] = qname . Substring ( 0 , index ) ; s [ 1 ] = qname . Substring ( index + 1 ) ; } } return s ; }
Split a qualifed type name into two strings, where
s[0] is the namespace, and s[1] is the simple type
name.
Split a qualifed type name into two strings where s [ 0 ] is the namespace and s [ 1 ] is the simple type name .
//        index = qname.LastIndexOf('<'); //        if (index != -1) //        { //          s[0] = qname.Substring(0, index); //          s[1] = qname.Substring(index+1, qname.Length-index-2); //        } //        else //        { //        }
qname
string