基本工具
穩定數字、文字、日期、陣列、隨機值、程序,以及“數字”“文字”等值節點
16 個類別,共 614 個節點
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 支援等級
- 第 1 級(擬定)
- 所屬包
- 標準庫 Foundation Primitives
標準庫
數字、文字、日期、陣列、列表、字典、集合與型別轉換——幾乎每張圖都需要它們。
日期時間操作
加上時間間隔給時間日期加上一段時間間隔。加天數把時間日期按天數前後移動,天數可以是小數(0.5 即十二小時)。加小時數把時間日期按小時數前後移動,可以是小數。加微秒數把時間日期按微秒數前後移動,可以是小數。加毫秒數把時間日期按毫秒數前後移動,可以是小數。加分鐘數把時間日期按分鐘數前後移動,可以是小數。加月數把時間日期按整月前後移動,時刻保持不變。加秒數把時間日期按秒數前後移動,可以是小數。加計時週期數把時間日期按計時週期數前後移動,一個計時週期為 100 納秒。加年數把時間日期按整年前後移動,月、日和時刻保持不變。比較比較兩個時間日期。建立時間日期用計時週期數建立時間日期。建立日期用年、月、日建立日期。建立時刻用時和分建立時刻。建立時間間隔用計時週期數建立時間間隔。日期部分取得時間日期的日期部分。從時間日期取日期取時間日期的日曆日期,去掉其時刻。從日序號取日期用天數編號建立日期,即公曆中自 0001-01-01 起的天數。日取得時間日期是當月的第幾天。日序號把日期表示為一個天數編號,即自 0001-01-01 起的天數;兩個天數編號相減即為兩者相隔的天數。星期幾取得時間日期是星期幾。一年中的第幾天取得時間日期是當年的第幾天。天數取得時間間隔的天數部分。相隔天數計算從一個日期到另一個日期相隔的日曆天數。月份天數給出公曆中某年某月的天數,已考慮閏年。分解把時間日期拆分為年、月、日。除以用一個數去除時間間隔,例如把它等分。絕對時長取時間間隔的絕對長度,去掉其正負號。相等檢查兩個時間日期是否相同。從二進位制值還原從“轉為二進位制值”生成的數字還原時間日期,連同其時間型別。由日期和時刻組合把日期和時刻合成一個時間日期。從檔案時間轉換把 Windows 檔案時間轉換為本機所在時區的時間日期。從 UTC 檔案時間轉換把 Windows 檔案時間轉換為 UTC 時間日期。從 OLE 自動化日期轉換把 OLE 自動化日期(Excel 等 Office 應用表示日期所用的數字格式)轉換為時間日期。從 Unix 毫秒時間戳轉換把 JavaScript 和許多 Web API 使用的毫秒級 Unix 時間戳轉換回 UTC 時間日期。從 Unix 秒時間戳轉換把秒級 Unix 時間戳轉換回 UTC 時間日期。日期最大值Gets the largest possible value of System.DateOnly.日期最小值Gets the smallest possible value of System.DateOnly.最大值Gets the largest possible value of System.DateTime.最小值Gets the smallest possible value of System.DateTime.每計時週期納秒數Gets the number of nanoseconds in one tick.現在Gets the current local date and time.每天計時週期數Gets the number of ticks in one day.每小時計時週期數Gets the number of ticks in one hour.每微秒計時週期數Gets the number of ticks in one microsecond.每毫秒計時週期數Gets the number of ticks in one millisecond.每分鐘計時週期數Gets the number of ticks in one minute.每秒計時週期數Gets the number of ticks in one second.時刻最大值Gets the largest possible value of System.TimeOnly.時刻最小值Gets the smallest possible value of System.TimeOnly.時間間隔最大值Gets the largest possible value of System.TimeSpan.時間間隔最小值Gets the smallest possible value of System.TimeSpan.零時間間隔Gets a zero-length System.TimeSpan.今天Gets the current local date with the time set to midnight.Unix 紀元Gets the Unix epoch date and time: 1970-01-01 00:00:00 UTC.目前 UTC 時間Gets the current UTC date and time.取得時間日期格式用目前區域的每種標準格式寫出時間日期,便於看出該選哪種格式。大於檢查一個時間日期是否晚於另一個。大於或等於檢查一個時間日期是否晚於或等於另一個。小時取得時間日期的小時(24 小時制)。小時數取得時間間隔的小時部分,即去掉整天后剩下的部分;要得到整個時間間隔摺合的小時數,請用“總小時數”。是否介於兩者之間檢查時刻是否落在某個範圍內,包括 22:00 到 06:00 這樣跨過午夜的範圍。是否為夏令時檢查時間日期是否處於本機所在時區的夏令時內。是否為閏年判斷給定年份是否為閏年。時間種類說明時間日期被標為本地時間、UTC 還是未指定。小於檢查一個時間日期是否早於另一個。小於或等於檢查一個時間日期是否早於或等於另一個。微秒取得時間日期的微秒部分。微秒數取得時間間隔的微秒部分,即去掉整毫秒後剩下的部分;要得到整個時間間隔摺合的微秒數,請用“總微秒數”。毫秒取得時間日期的毫秒部分。毫秒數取得時間間隔的毫秒部分,即去掉整秒後剩下的部分;要得到整個時間間隔摺合的毫秒數,請用“總毫秒數”。分取得時間日期的分鐘。分鐘數取得時間間隔的分鐘部分,即去掉整小時後剩下的部分;要得到整個時間間隔摺合的分鐘數,請用“總分鐘數”。月取得時間日期的月份。乘以把時間間隔乘以一個倍數,例如求它的三倍或一半。納秒取得時間日期的納秒部分。納秒數取得時間間隔的納秒部分,即去掉整微秒後剩下的部分。取反取時間間隔的相反數:5 分鐘變成 -5 分鐘,反之亦然。不相等檢查兩個時間日期是否不同。解析時間日期把文字解析為時間日期。解析日期把文字解析為日期。按格式解析時間日期從必須完全符合某一格式(如 "yyyy-MM-dd HH:mm:ss")的文字中讀取時間日期。按格式解析日期從必須完全符合某一格式(如 "yyyy-MM-dd")的文字中讀取日期。按格式解析時刻從必須完全符合某一格式(如 "HH:mm:ss")的文字中讀取時刻。按格式解析時間間隔從必須完全符合某一格式(如 "c" 或 @"hh\:mm" 這樣的自訂格式)的文字中讀取時間間隔。解析時刻把文字解析為時刻。解析時間間隔把文字解析為時間間隔。秒取得時間日期的秒。秒數取得時間間隔的秒部分,即去掉整分鐘後剩下的部分;要得到整個時間間隔摺合的秒數,請用“總秒數”。指定時間種類建立一個計時週期與給定值相同、但時間型別為指定型別的新時間日期。減去計算從一個時間日期到另一個經過的時間。計時週期數把時間日期表示為一個計時週期數,便於儲存或做精確運算。相隔時間計算從一個日期到另一個日期的時間,結果是以整天計的時間間隔。一天中的時刻取得時間日期的時刻,表示為自午夜起的時間間隔。從時間日期取時刻取時間日期的時刻,去掉其日期。從計時週期數取時刻用自午夜起的計時週期數建立時刻。從時間間隔取時刻把自午夜起的時間間隔轉換為時刻,例如把 13 小時轉換為 13:00。由天數生成時間間隔用天數建立時間間隔,天數可以是小數或負數(1.5 即一天半)。由小時數生成時間間隔用小時數建立時間間隔,可以是小數或負數。由微秒數生成時間間隔用微秒數建立時間間隔,可以是小數或負數。由毫秒數生成時間間隔用毫秒數建立時間間隔,可以是小數或負數。由分鐘數生成時間間隔用分鐘數建立時間間隔,可以是小數或負數。由秒數生成時間間隔用秒數建立時間間隔,可以是小數或負數。由計時週期數生成時間間隔用計時週期數建立時間間隔,一個計時週期為 100 納秒。時間間隔轉為時刻把自午夜起的時間間隔轉換為時刻,例如把 13 小時轉換為 13:00。轉為二進位制值把時間日期連同其時間型別打包成一個 64 位數字以便儲存;“從二進位制值還原”可把它還原。轉為日期取時間日期的日曆日期,去掉其時刻。轉為時間日期把一個日期和一個時刻合成一個時間日期。轉為檔案時間把時間日期轉換為 Windows 檔案時間:自 1601-01-01 00:00:00 UTC 起經過的 100 納秒間隔數。轉為 UTC 檔案時間把時間日期轉換為 Windows 檔案時間,未指定型別的值視為已是 UTC。轉為本地時間把時間日期轉換為本地時間。轉為長日期文字按目前區域的長日期模式寫出時間日期中的日期,例如美式英語中的 Saturday, June 15, 2024。轉為長時間文字按目前區域的長時間模式寫出時間日期中的時間,通常包含時、分、秒。轉為 OLE 自動化日期把時間日期轉換為 OLE 自動化日期,即 Excel 等 Office 應用表示日期所用的數字格式。轉為短日期文字按目前區域的短日期模式寫出時間日期中的日期,例如美式英語中的 6/15/2024。轉為短時間文字按目前區域的短時間模式寫出時間日期中的時間,通常包含時和分。轉為文字把時間日期轉換為文字。總天數取得時間間隔摺合的天數,含小數部分(36 小時即 1.5)。總小時數取得時間間隔摺合的小時數,含小數部分(90 分鐘即 1.5)。總微秒數取得時間間隔摺合的微秒數,含小數部分。總毫秒數取得時間間隔摺合的毫秒數,含小數部分。總分鐘數取得時間間隔摺合的分鐘數,含小數部分。總納秒數取得時間間隔摺合的納秒數。總秒數取得時間間隔摺合的秒數,含小數部分。轉為時刻取時間日期的時刻,去掉其日期。轉為時間間隔把時刻轉換為自午夜起的時間間隔,例如把 13:30 轉換為 13 小時 30 分鐘。轉為 UTC 時間把時間日期轉換為協調世界時(UTC)。轉為 Unix 毫秒時間戳把時間日期轉換為毫秒級 Unix 時間戳:自 1970-01-01 00:00:00 UTC 起經過的整毫秒數,JavaScript 和許多 Web API 使用這種形式。轉為 Unix 秒時間戳把時間日期轉換為 Unix 時間戳:自 1970-01-01 00:00:00 UTC 起經過的整秒數。嘗試解析時間日期嘗試從文字中讀取時間日期(不隨機器的區域改變),失敗時報告失敗而不是出錯中止。嘗試解析日期嘗試從文字中讀取日期(不隨機器的區域改變),失敗時報告失敗而不是出錯中止。嘗試按格式解析時間日期嘗試從必須完全符合某一格式的文字中讀取時間日期,失敗時報告失敗而不是出錯中止。嘗試按格式解析日期嘗試從必須完全符合某一格式的文字中讀取日期,失敗時報告失敗而不是出錯中止。嘗試按格式解析時刻嘗試從必須完全符合某一格式的文字中讀取時刻,失敗時報告失敗而不是出錯中止。嘗試按格式解析時間間隔嘗試從必須完全符合某一格式的文字中讀取時間間隔,失敗時報告失敗而不是出錯中止。嘗試解析時刻嘗試從文字中讀取時刻(不隨機器的區域改變),失敗時報告失敗而不是出錯中止。嘗試解析時間間隔嘗試從形如 [-][d.]hh:mm[:ss[.fffffff]] 的文字中讀取時間間隔(不隨機器的區域改變),失敗時報告失敗而不是出錯中止。年取得時間日期的年份。
算術運算
原子質量單位Atomic mass constant (kg)阿伏伽德羅常數Avogadro's number (1/mol)玻爾茲曼常數Boltzmann constant (J/K)庫侖常數Coulomb constant (N·m^2/C^2)自然常數 eEuler's number (e).電子質量Electron mass (kg)元電荷Elementary charge (C)法拉第常數Faraday constant (C/mol)氣體常數Universal gas constant (J/(mol·K))引力常數Gravitational constant (m^3·kg^-1·s^-2)中子質量Neutron mass (kg)圓周率Archimedes' constant (π).普朗克常數Planck constant (J·s)質子質量Proton mass (kg)約化普朗克常數Reduced Planck constant (J·s)裡德伯常數Rydberg constant (1/m)光速Speed of light in vacuum (m/s)標準大氣壓Standard atmospheric pressure (Pa)標準重力加速度Standard acceleration due to gravity on Earth (m/s^2)斯特藩-玻爾茲曼常數Stefan–Boltzmann constant (W·m^-2·K^-4)二倍圓周率 τTau (τ = 2π).真空磁導率Vacuum permeability (N/A^2)真空介電常數Vacuum permittivity (F/m)維恩位移常數Wien displacement constant (m·K)絕對值返回雙精度浮點數的絕對值。反餘弦返回餘弦為指定數字的角度。反雙曲餘弦返回其雙曲餘弦為指定數的角。英畝轉平方米Converts acres to square meters by multiplying by 4,046.8564224, the international acre.加法Adds two numbers and returns the sum.反正弦返回指定數字的正弦值所對應的角度。反雙曲正弦返回其雙曲正弦為指定數字的角度。反正切返回其切線為指定值的角度。四象限反正切返回其切線為兩個指定數字的商的角度。反雙曲正切返回其雙曲正切為指定數字的角度。標準大氣壓轉帕斯卡Converts standard atmospheres to pascals by multiplying by 101,325, the exact standard atmosphere.巴轉帕斯卡Converts bar to pascals by multiplying by 100,000.大於Determines whether the first double is greater than the second double.大於或等於Determines whether the first double is greater than or equal to the second double.前一個可表示的數返回一個與指定值比較小的最大值。後一個可表示的數返回與指定值比較大的最小值。卡路里轉焦耳Converts calories to joules by multiplying by 4.184, the thermochemical calorie.向上取整返回大於或等於指定雙精度浮點數的最小整數值。攝氏度轉華氏度Converts degrees Celsius to degrees Fahrenheit by the formula °F = °C × 9/5 + 32.攝氏度轉開爾文Converts degrees Celsius to kelvins by adding 273.15.公分轉米Converts centimeters to meters by dividing by 100.限制範圍返回被限制到最小值和最大值之間的值。限制到 0 到 1Limits a number to the range 0 to 1, replacing anything below 0 with 0 and anything above 1 with 1.限制到位元組範圍Round and clamp by absolute value to byte value range.限制到小正整數範圍Clamp ushort-value floats.計算圓周率Computes PI to arbitrary accuracy (digits after decimal point).複製符號返回一個具有 x 的大小和 y 的符號的值。餘弦返回指定角度的餘弦值。雙曲餘弦返回指定角度的雙曲餘弦。立方根返回指定數字的立方根。立方米轉升Converts cubic meters to liters by multiplying by 1,000.角度轉弧度Converts degrees to radians by multiplying by π/180.除法將第一個數字除以第二個數字並返回商。電子伏特轉焦耳Converts electronvolts to joules by multiplying by the elementary charge, 1.602176634e-19 (exact since the 2019 SI redefinition).等於Determines whether the first double is equal to the second double.指數函數返回e的指定冪。華氏度轉攝氏度Converts degrees Fahrenheit to degrees Celsius by the formula °C = (°F − 32) × 5/9.英尺轉米Converts feet to meters by multiplying by 0.3048, the exact international foot.向下取整返回小於或等於指定的雙精度浮點數的最大整數值。小數部分Gives the fractional part of a number measured up from the next whole number below it, always from 0 to 1, so 2.75 gives 0.75 and -0.25 gives 0.75 (not -0.25).融合乘加返回 (x * y) + z,作為一個三元操作四捨五入。加侖轉升Converts gallons to liters by multiplying by 3.785411784, the exact US liquid gallon.克轉千克Converts grams to kilograms by dividing by 1,000.赫茲轉千赫茲Converts hertz to kilohertz by dividing by 1,000.馬力轉瓦特Converts horsepower to watts by multiplying by 745.699872, the mechanical (imperial) horsepower.小時轉秒Converts hours to seconds by multiplying by 3,600.IEEE 餘數返回指定數字除以另一個指定數字所得到的餘數。以 2 為底的整數對數返回指定數字的基數 2 整數對數。英寸轉米Converts inches to meters by multiplying by 0.0254, the exact international inch.插值Linear interpolation.是否有限Tells whether a number is an ordinary finite value, as opposed to NaN (not a number) or positive or negative infinity, for example to catch the result of dividing by zero before it spreads.焦耳轉卡路里Converts joules to calories by dividing by 4.184, the thermochemical calorie.焦耳轉電子伏特Converts joules to electronvolts by dividing by the elementary charge, 1.602176634e-19 (exact since the 2019 SI redefinition).焦耳轉千焦Converts joules to kilojoules by dividing by 1,000.開爾文轉攝氏度Converts kelvins to degrees Celsius by subtracting 273.15.千克轉克Converts kilograms to grams by multiplying by 1,000.千克轉磅Converts kilograms to pounds by dividing by 0.45359237, the exact avoirdupois pound.千赫茲轉赫茲Converts kilohertz to hertz by multiplying by 1,000.千焦轉焦耳Converts kilojoules to joules by multiplying by 1,000.千米轉米Converts kilometers to meters by multiplying by 1,000.千米轉英里Converts kilometers to miles by dividing by 1.609344, the exact international (statute) mile.千帕轉帕斯卡Converts kilopascals to pascals by multiplying by 1,000.千瓦轉瓦特Converts kilowatts to watts by multiplying by 1,000.千米每小時轉米每秒Converts kilometers per hour to meters per second by dividing by 3.6.線性插值Blends linearly from A to B: a T of 0 gives A, 1 gives B, and 0.5 gives the midpoint.線性插值(0 到 1 之間)Blends between two byte values, such as two color channels, by a factor from 0 to 1: 0 gives A, 1 gives B.升轉立方米Converts liters to cubic meters by dividing by 1,000.升轉加侖Converts liters to gallons by dividing by 3.785411784, the exact US liquid gallon.升轉毫升Converts liters to milliliters by multiplying by 1,000.自然對數返回指定數字的自然對數(以e為底)。常用對數返回指定數字的以10為底的對數。以 2 為底的對數返回指定數字的以2為底的對數。最大值Returns the larger of two double-precision floating-point numbers.絕對值較大者返回兩個雙精度浮點數的較大幅度。米每秒轉千米每小時Converts meters per second to kilometers per hour by multiplying by 3.6.米每秒轉英里每小時Converts meters per second to miles per hour by dividing by 0.44704.米轉公分Converts meters to centimeters by multiplying by 100.米轉英尺Converts meters to feet by dividing by 0.3048, the exact international foot.米轉英寸Converts meters to inches by dividing by 0.0254, the exact international inch.米轉千米Converts meters to kilometers by dividing by 1,000.米轉毫米Converts meters to millimeters by multiplying by 1,000.英里每小時轉米每秒Converts miles per hour to meters per second by multiplying by 0.44704.英里轉千米Converts miles to kilometers by multiplying by 1.609344, the exact international (statute) mile.毫升轉升Converts milliliters to liters by dividing by 1,000.毫米轉米Converts millimeters to meters by dividing by 1,000.最小值返回兩個雙精度浮點數中較小的一個。絕對值較小者返回兩個雙精度浮點數的較小絕對值。分鐘轉秒Converts minutes to seconds by multiplying by 60.取模Mod and wrap around to be always positive.取模返回一個數字被另一個數字除後的餘數。乘法計算兩個數字並返回它們的乘積。近似相等Tells whether two numbers are equal apart from a tiny rounding error, which is the right test for results of floating-point arithmetic where exact equality usually fails (0.1 + 0.2 is not exactly 0.3).取相反數Flips the sign of a number, turning positive into negative and negative into positive.牛頓轉磅力Converts newtons to pounds-force by dividing by 4.4482216152605, the exact pound-force.不等於Determines whether the first double is not equal to the second double.帕斯卡轉標準大氣壓Converts pascals to standard atmospheres by dividing by 101,325, the exact standard atmosphere.帕斯卡轉巴Converts pascals to bar by dividing by 100,000.帕斯卡轉千帕Converts pascals to kilopascals by dividing by 1,000.磅力轉牛頓Converts pounds-force to newtons by multiplying by 4.4482216152605, the exact pound-force.磅轉千克Converts pounds to kilograms by multiplying by 0.45359237, the exact avoirdupois pound.冪運算返回指定數字的指定冪。弧度轉角度Converts radians to degrees by multiplying by 180/π.二維偽隨機數Random number generator taking two seeds; rand2(p,q) = rand2(q,p) is important倒數估計返回指定數字的倒數估計值。平方根倒數估算返回指定數字的倒數平方根估算值。在 0 到 1 之間迴圈Repeats a number over the range 0 (inclusive) to 1 (exclusive), so 1.25 gives 0.25 and -0.25 gives 0.75; this gives the same result as NumberRoutines.Wrap01.開方返回給定數字的指定根。舍入將雙精度浮點值舍入到最接近的整數值,並將中點值舍入到最接近的偶數。乘以 2 的冪返回 x * 2^n 的高效計算。秒轉小時Converts seconds to hours by dividing by 3,600.秒轉分鐘Converts seconds to minutes by dividing by 60.符號返回一個整數,指示雙精度浮點數的符號。正弦返回指定角度的正弦值。正弦餘弦返回指定角度的正弦和餘弦。正弦(角度制)返回指定角度的正弦值。雙曲正弦返回指定角度的雙曲正弦。小於Determines whether the first double is less than the second double.小於或等於Determines whether the first double is less than or equal to the second double.更平滑的階躍Eases a value between 0 and 1 along Ken Perlin's smootherstep curve (6t⁵ − 15t⁴ + 10t³), which is flatter at both ends than smoothstep because its curvature is also zero there; preferred for noise and for motion that should not visibly jerk at the start or end.平滑階躍Gives 0 below Edge0, 1 above Edge1, and an S-shaped smooth transition in between, as the smoothstep function of shading languages does; use it to fade something in over a range of values.平滑階躍(0 到 1)Eases a value between 0 and 1 along an S-shaped curve that starts and ends flat (3x² − 2x³), for smooth fades and transitions without the abrupt start and stop of a straight line.區間平滑階躍平方千米轉平方米Converts square kilometers to square meters by multiplying by 1,000,000.平方米轉英畝Converts square meters to acres by dividing by 4,046.8564224, the international acre.平方米轉平方千米Converts square meters to square kilometers by dividing by 1,000,000.平方根返回指定數字的平方根。減法從第一個數字中減去第二個數字並返回結果。正切返回指定角度的正切值。雙曲正切Returns the hyperbolic tangent of the specified angle.0 到 1 轉為位元組Converts a normalized value from 0 to 1, such as a color channel, to a byte from 0 to 255, clamping values outside the range first.轉為角度Converts an angle from radians to degrees (multiplying by 180/π) in single precision.轉為弧度Converts an angle from degrees to radians (multiplying by π/180) in single precision, for passing degree angles to trigonometry that works in radians.截斷計算指定雙精度浮點數的整數部分。瓦特轉馬力Converts watts to horsepower by dividing by 745.699872, the mechanical (imperial) horsepower.瓦特轉千瓦Converts watts to kilowatts by dividing by 1,000.環繞到範圍內Wraps a coordinate into the range 0 (inclusive) to Size (exclusive), so a position that runs off one side of a tiling image or grid comes back in from the other.環繞到 0 到 1Wraps a number into the range 0 (inclusive) to 1 (exclusive) by keeping only its position within a unit cycle, so 1.25 gives 0.25 and -0.25 gives 0.75; useful for repeating patterns, looping animation time and hue.
三維向量
負無窮全一向量正無窮位元組大小X 軸單位向量Y 軸單位向量Z 軸單位向量X 分量Y 分量Z 分量零向量三維向量絕對值向上取整分解相等向下取整設定分量取得長度快速取得長度取得長度平方快速取得長度倒數設定 XY設定 XZ設定 XZY設定 YX設定 YXZ設定 YZ設定 YZX設定 ZX設定 ZXY設定 ZY設定 ZYX取得雜湊碼歸一化歸一化向量快速歸一化四捨五入設定分量設定 XY設定 XZ設定 XZY設定 YX設定 YXZ設定 YZ設定 YZX設定 ZX設定 ZXY設定 ZY設定 ZYX轉為文字截斷相加重心座標插值計算夾角限制範圍分量相等分量最大值分量最小值分量不相等叉積距離距離平方相除點積指數插值大於大於或等於線性插值小於小於或等於模長較大者模長較小者相乘加法運算除法運算相等運算顯式轉換大於運算大於或等於運算三維向量不等運算小於運算小於或等於運算乘法運算減法運算取負運算球面線性插值相減變換按列變換變換法線逆變換法線透視變換變換位置按行變換變換向量
文字操作
& 符號A constant for ampersand symbol.星號A constant for asterisk symbol.@ 符號A constant for at symbol.反斜槓A constant for backslash symbol.回車符A constant for carriage return symbol.冒號A constant for colon symbol.逗號A constant for comma symbol.逗號加空格A constant for comma and space symbols.短橫線A constant for dash symbol.雙引號A constant for double quote symbol.空文字A constant for empty string.等號A constant for equals symbol.感嘆號A constant for exclamation mark symbol.雜湊A constant for hash symbol.左花括號A constant for left curly brace symbol.左方括號A constant for left square bracket symbol.左圓括號A constant for left parenthesis symbol.換行符號A constant for newline symbol.句點A constant for period symbol.豎線A constant for pipe symbol.問號A constant for question mark symbol.右花括號A constant for right curly brace symbol.右方括號A constant for right square bracket symbol.右圓括號A constant for right parenthesis symbol.分號A constant for semicolon symbol.單引號A constant for single quote symbol.斜槓A constant for slash symbol.空格A constant for space symbol.製表符A constant for tab symbol.底線A constant for underscore symbol.Windows 換行符號A constant for Windows-style newline symbol.轉為駝峰式字元轉 ASCII 位元組比較與之比較拼接Append string values.包含Checks whether text exists.轉為真否陣列轉為整數陣列轉為數字陣列轉為文字陣列Converts a multiline text to an array of strings.複製到字元陣列以此結尾相等轉義符Given plain text representing a character literal, treat it as if it were a C# character literal.轉義文字Given plain text (like that read from a file), treat it as if it were a C# literal.格式化Formats a string using a template string by replacing format placeholders with the specified values.取得字元取得雜湊碼轉為易讀文字查詢位置查詢任一字元的位置插入是否已規範化是否為空是否為空或空白連線文字Join string values with separator.轉為短橫線式查詢最後位置查詢任一字元的最後位置長度Get length of text.首字母小寫規範化左側填充右側填充轉為帕斯卡式正規表示式替換Replaces all occurrences of a specified regular expression pattern in the input string with a replacement string.移除替換Replaces matching text.替換換行符號拆分Splits a string using a specified separator character.按行拆分Splits a string into an array using newline characters as separators, while trimming whitespace and removing empty entries.以此開頭子文字Extracts part of the string.轉為標題式轉為字元陣列轉為小寫轉為小寫(與區域無關)轉為大寫轉為大寫(與區域無關)去除首尾空白去除末尾空白去除開頭空白變數名轉為易讀文字
陣列操作
作為只讀陣列A read-only view of the array, for handing its contents on without letting the receiver change them.二分查詢Finds a value in an array that is already sorted in ascending order, much faster than a front-to-back search on a large array.清空Resets every element of the array, in all dimensions, to its type's default: 0 for numbers, false for booleans, null for text and objects.複製陣列A new array of the same type, shape and contents, so the copy can be changed without affecting the original.受約束複製Copies a run of elements from one array into another all-or-nothing: if the copy cannot complete, the destination is left exactly as it was.全部轉換A new array made by passing each element through a converter, for turning an array of one type into another, such as numbers into labels.複製Copies a run of elements from one position in an array to a position in another (or the same) array, converting element types where a widening or boxing conversion allows.複製到陣列Copies every element of a one-dimensional array into another array, starting at a 64-bit position in the destination.建立陣列例項A new array of any element type and dimension count, where each dimension can start at an index other than 0 (for example a grid indexed from 1).按陣列型別建立陣列A new array of the given array type (for example a number grid type), with the given size for each of its dimensions.解析逗號分隔的真否陣列解析逗號分隔的數字陣列解析逗號分隔的文字名稱複製為陣列空陣列An array with no elements, for when a result has nothing in it; the same shared instance is returned every time, so it costs no allocation.存在滿足條件的項Whether at least one element passes a test, for questions such as "is any value negative?".填充Overwrites a run of elements with one value, leaving the rest of the array as it was.查詢The first element, from the front, that passes a test.查詢全部Every element that passes a test, as a new array, for filtering an array down to the entries you want.查詢索引The position of the first element passing a test within a section of the array, searching forwards.查詢最後一個The last element, searching from the back, that passes a test.查詢最後索引The position of the last element that passes a test, searching from the back.摺疊The whole array folded into one value: starting from the seed, function(accumulated, element), left to right.逐項執行Runs an action once for each element, front to back, for side effects such as printing or accumulating.取得列舉器An enumerator that walks every element of the array in order; a multidimensional array is walked with the last dimension changing fastest.取得長度The number of elements along one dimension, for example the number of rows (dimension 0) or columns (dimension 1) of a grid.取得大整數長度The number of elements along one dimension, as a 64-bit number.取得下界The first valid index along one dimension; 0 for ordinary arrays, other values only for arrays created with explicit lower bounds.取得上界The last valid index along one dimension, inclusive; for an ordinary array this is that dimension's length minus 1, and -1 for an empty dimension.取得值Reads the element at a position in a three-dimensional array, given as 64-bit indices.項的索引The position of the first element equal to a value within a section of the array, searching forwards.初始化Runs the element type's parameterless constructor on every element of an array of value types; for arrays of objects, numbers or other types without such a constructor it does nothing.是否固定大小Whether the array's size is fixed; always true, since an array cannot grow or shrink in place (Resize makes a new array instead).是否只讀Whether the array's elements can be changed; always false for an array, because every array's elements are writable (wrap it with As Read Only for a view that cannot be written through).是否同步Whether access to the array is thread-safe on its own; always false for an array, so lock on SyncRoot when several threads share one.項的最後索引The position of the last element equal to a value within a section of a one-dimensional array of any element type that ends at a given index, searching backwards.長度The total number of elements across all dimensions of the array, so a 3 by 4 grid gives 12.大整數長度The total number of elements across all dimensions of the array, as a 64-bit number; use it instead of Length when a count could exceed the 32-bit range.建立陣列建立真否陣列建立數字陣列建立文字陣列對映Each element through a function: the array that comes back is the results, in order.最大長度The largest number of elements any single array can hold on this runtime (2,147,483,591), useful as an upper limit when checking a requested size before allocating.維數The number of dimensions of the array: 1 for a plain list of values, 2 for a grid, 3 for a volume.重複A new array holding the same value in every slot, for when you need a run of identical entries such as a row of zeros or a default label repeated.調整大小Changes an array's length by replacing it with a new array of the new size that keeps the existing elements from the front.反轉Reverses the order of a run of elements in place, leaving the rest of the array as it was.設定值Writes a value into a two-dimensional array at a row and column given as 64-bit indices.排序Sorts a run of elements in place using the given comparer, leaving the rest of the array as it was.同步根The object to lock on when several threads share this array; for an ordinary array it is the array itself.全部滿足條件Whether every element passes a test, for questions such as "are all values positive?".
列舉操作
新增標誌Switches on the bits of Flag in Value; for a flag enum, adds that option.格式化Writes an enum value as text in a chosen style: its name, its number in decimal or hexadecimal, or its flags spelled out by name.由數值取列舉值Turns a number into the enum value with that number, for example a value read from a file or a database column.取得列舉值Every value of an enum type chosen at run time, for when you only have the type as a value rather than as the node's type argument.取得名稱The declared name of Value, or empty text when no constant has that exact value (for example a combination of flags without a name of its own).取得所有名稱The names of every constant the enum declares, for example to fill a drop-down list.取得基礎型別The integer type an enum stores its values in, which is System.Int32 unless the enum declares otherwise.取得值列表Every value the enum declares, as a read-only list; the same values in the same order as EnumRoutines.GetValues.取得所有值Every value the enum declares, for example to go through all the choices one by one.包含標誌Whether every bit set in Flag is also set in Value; for a flag enum, whether the value includes that option (or all of several combined options).是否已定義Whether Value is exactly one of the enum's named constants; use it to reject numbers that were cast or converted into the enum without matching any choice.是否為零Whether Value has no bits set at all; for a flag enum, whether no option is chosen.解析列舉Turns text into an enum value, throwing when it cannot; use EnumRoutines.TryParse when the text may be bad.移除標誌Switches off the bits of Flag in Value; for a flag enum, removes that option.切換標誌Flips the bits of Flag in Value: options that were on go off and options that were off come on.嘗試由已定義的數值取列舉值Turns a number into the enum value with that number only if it is one of the enum's named constants; answers false for null, unconvertible or undeclared values instead of throwing.嘗試由數值取列舉值Turns a number into the enum value with that number like EnumRoutines.FromValue, but answers false instead of throwing when the value is null or cannot be converted.嘗試取得名稱The declared name of Value, or null when no constant has that exact value; unlike EnumRoutines.GetName, this lets you tell "no name" apart from a name.嘗試解析列舉Turns text into an enum value without throwing, telling you whether it succeeded; it accepts the same text as EnumRoutines.Parse, including numbers that match no named constant.嘗試解析已定義的列舉Turns text into an enum value only if the result is one of the enum's named constants, so stray numbers and unnamed flag combinations are rejected; use it for validating user input.
過程式程式設計
順序執行從上到下依次執行它的每個輸出:一條按順序做幾件事的路徑。遍歷對集合中的每一項執行一次它的“下一步”路徑,該項作為“目前項”;最後一項之後執行“完成”。迭代迴圈從“起始”到“結束”按“步長”計數,對每個數字執行一次它的“下一步”路徑,該數字作為“目前值”;最後一個之後執行“完成”。條件迴圈只要條件為真,就反覆執行它的“下一步”路徑;條件為假時執行“完成”。重複按給定次數執行它的“下一步”路徑,第幾輪作為“目前索引”;最後一輪之後執行“完成”。分支條件成立時走“真”路徑,不成立時走“假”路徑。多路分支按順序比較各個情形,走與它的值相等的那一路;都不相等時走“預設”。跳出迴圈立即離開最內層的迴圈,就像 C# 中的 break。繼續下一輪結束最內層迴圈的這一輪,進入下一輪,就像 C# 中的 continue。嘗試執行它的“嘗試”路徑;其中某一步失敗時,執行第一個能接住這種失敗的“捕獲”;無論發生什麼,“最終”都在之後執行;然後沿“完成”繼續。自訂事件同名事件被激發時(由“激發事件”或圖所執行的框架激發),開始一條自己的路徑。激發事件按名稱激發一個自訂事件,執行從它的“自訂事件”開始的路徑。自身此圖正在其上執行的例項,可以像普通值一樣傳給其他節點。返回在此結束例程並交回它的輸出;例程的每條路徑上都可以有一個“返回”。等待等待若干秒後繼續。等待至等待到指定時間後繼續;已過去的時間會立即繼續。
基礎節點
隨機
隨機挑選從列表中隨機挑選一項,每一項的機會相同。用生成器挑選用給定的生成器從列表中挑選一項,每一項的機會相同;用“帶種子的生成器”時,每次執行挑出的都相同。按權重隨機挑選從列表中隨機挑選一項,每一項的機會與它的權重成正比:權重為 2 的項出現的次數是權重為 1 的兩倍,權重為 0 的項從不出現。用生成器按權重挑選用給定的生成器從列表中挑選一項,每一項的機會與它的權重成正比;用“帶種子的生成器”時,每次執行挑出的都相同。帶種子的生成器一個隨機數生成器,給它同一個種子,它每次都給出同一個序列:用於每次執行都相同的挑選和數字,例如程序化關卡或測試。隨機數一個從最小值起、不到最大值的隨機數,其間每個值的機會相同。用生成器取數用給定的生成器抽取一個從最小值起、不到最大值的隨機數;用“帶種子的生成器”時,每次執行得到的數都相同。隨機整數一個從最小值起、不到最大值的隨機整數:擲骰子用 1 和 7。用生成器取整數用給定的生成器抽取一個從最小值起、不到最大值的隨機整數;用“帶種子的生成器”時,每次執行得到的數都相同。
程序
命令列程式和參數組成的命令列,按系統讀取的方式加引號,用於在日誌中顯示“執行命令”或“啟動程序”執行的內容。是否在執行用“啟動程序”開始的程式是否仍在執行。執行命令用參數執行一個程式,等它結束,返回它結束時的程式碼和列印的內容。執行 Shell 命令通過系統的命令列直譯器(Windows 上是 cmd,其他系統上是 sh)執行一行命令,等它結束,返回結束時的程式碼和列印的內容。啟動程序用參數啟動一個程式並立即繼續,返回正在執行的程式,供“等待程序”“是否在執行”和“停止程序”使用。停止程序停止用“啟動程序”開始的程式及它啟動的所有程式;已結束的程式保持原樣。等待程序等待用“啟動程序”開始的程式結束,返回它結束時的程式碼和列印的內容。