Skip to content

lib-axon 库参考(第 2 部分) ​

原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793652397/FIN+5.3.1+lib-axon+part+2 中文整理基于 FIN 5.3.1

导读: "foo bar".parseUri foo bar

以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。


目录(导读) ​

  • def
  • uriDecode(val, checked: true)
  • uriEncode(val)
  • uriExt(val)
  • uriFrag(val)
  • uriHost(val)
  • uriIsDir(val)
  • uriName(val)
  • uriPath(val)
  • uriPathStr(val)
  • uriPlusSlash(val)
  • uriPort(val)
  • uriQueryStr(val)
  • uriScheme(val)
  • vals(dict)
  • weekOfYear(val, startOfWeek: null)
  • weekday(t)
  • xstr(type, val)
  • year(d)
  • yesterday()

概述(中译) ​

uriDecode(val, checked: true)

根据 RFC 3986 将 ASCII 百分比编码字符串解析为 Uri。所有 %HH 转义序列都被转换为字节,然后字节序列被 UTF-8 解码为字符串。查询部分的 + 字符会被解析为空格。如果 checked 为 true,那么如果字符串是格式错误的 URI 或未正确编码,则抛出 ParseErr,否则返回 null。使用 parseUri() 从标准形式解析。有关标准形式和编码形式的详细讨论,请参见 Uri。

"foo bar".parseUri foo bar "foo%20bar".uriDecode foo bar


API 正文(英文) ​

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriEncode ​

uriEncode(val) ​

Return the percent encoded string for this Uri according to RFC 3986. Each section of the Uri is UTF-8 encoded into octects and then percent encoded according to its valid character set. Spaces in the query section are encoded as +.

Examples:

`foo bar`.uriEncode  >>  "foo%20bar"

meta ​

deffunc:uriEncode
isfunc
liblib:axon
nameuriEncode

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriExt ​

uriExt(val) ​

Get the URI extension of a Uri as a string or null.


meta ​

deffunc:uriExt
isfunc
liblib:axon
nameuriExt

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriFrag ​

uriFrag(val) ​

Return if the fragment identifier portion of the a URI after hash symbol


meta ​

deffunc:uriFrag
isfunc
liblib:axon
nameuriFrag

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriHost ​

uriHost(val) ​

Get the host Uri as a string or null


meta ​

deffunc:uriHost
isfunc
liblib:axon
nameuriHost

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriIsDir ​

uriIsDir(val) ​

Return if the URI path ends in a slash.


meta ​

deffunc:uriIsDir
isfunc
liblib:axon
nameuriIsDir

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriName ​

uriName(val) ​

Get the name Str of a Uri (last item in path).


meta ​

deffunc:uriName
isfunc
liblib:axon
nameuriName

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriPath ​

uriPath(val) ​

Get the path segments of a Uri as a list of Strs.


meta ​

deffunc:uriPath
isfunc
liblib:axon
nameuriPath

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriPathStr ​

uriPathStr(val) ​

Get the path a Uri as a string.


meta ​

deffunc:uriPathStr
isfunc
liblib:axon
nameuriPathStr

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriPlusSlash ​

uriPlusSlash(val) ​

Adding trailing slash to the URI. See Uri.plusSlash


meta ​

deffunc:uriPlusSlash
isfunc
liblib:axon
nameuriPlusSlash

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriPort ​

uriPort(val) ​

Get the port of a Uri as a Number or null


meta ​

deffunc:uriPort
isfunc
liblib:axon
nameuriPort

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriQueryStr ​

uriQueryStr(val) ​

Return if the query portion of the a URI after question mark


meta ​

deffunc:uriQueryStr
isfunc
liblib:axon
nameuriQueryStr

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uriScheme ​

uriScheme(val) ​

Get the scheme of a Uri as a string or null


meta ​

deffunc:uriScheme
isfunc
liblib:axon
nameuriScheme

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:vals ​

vals(dict) ​

Get the list of values used by a given dict


meta ​

deffunc:vals
isfunc
liblib:axon
namevals

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:weekOfYear ​

weekOfYear(val, startOfWeek: null) ​

Given a DateTime or Date, return the week number of the year. The result is a number between 1 and 53 using the given start of week weekday as number 0-6 (defaults start of week for current locale).


meta ​

deffunc:weekOfYear
isfunc
liblib:axon
nameweekOfYear

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:weekday ​

weekday(t) ​

Get weekday as integer from 0 to 6 of Date or DateTime. Zero indicates Sunday and 6 indicates Saturday


meta ​

deffunc:weekday
isfunc
liblib:axon
nameweekday

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:xstr ​

xstr(type, val) ​

Construct decoded XStr instance


meta ​

deffunc:xstr
isfunc
liblib:axon
namexstr

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:year ​

year(d) ​

Get year as integer such as 2010 from date or datetime


meta ​

deffunc:year
isfunc
liblib:axon
nameyear

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:yesterday ​

yesterday() ​

Return yesterday's Date according to context's time zone


meta ​

deffunc:yesterday
isfunc
liblib:axon
nameyesterday

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

name ​

Name key


meta ​

defname
isstr
liblib:axon

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

overridable ​

Applied to an ext function to enable override by project record functions.


meta ​

defoverridable
ismarker
liblib:axon

supertypes ​

markerMarker labels a dict with typing information


def ​

src ​

Source code


meta ​

defsrc
isstr
liblib:axon
multiLine✓

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

su ​

Requires superuser permission


meta ​

defsu
ismarker
liblib:axon
tagOnfinSetting, func, view

supertypes ​

markerMarker labels a dict with typing information